Skip to content

Commit 2e2ab01

Browse files
committed
Log the build revision and version number on start up.
This means that people can tell which version of selenium they are using when they start the server.
1 parent 4243f8c commit 2e2ab01

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

java/client/src/org/openqa/selenium/internal/BuildInfo.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ private static Properties loadBuildProperties() {
7979

8080
/** @return The embedded release label or "unknown". */
8181
public String getReleaseLabel() {
82-
return BUILD_PROPERTIES.getProperty("Selenium-Version", "unknown");
82+
return BUILD_PROPERTIES.getProperty("Selenium-Version", "unknown").trim();
8383
}
8484

8585
/** @return The embedded build revision or "unknown". */

java/server/src/org/openqa/grid/selenium/GridLauncherV3.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
import org.openqa.grid.internal.utils.configuration.StandaloneConfiguration;
3131
import org.openqa.grid.shared.CliUtils;
3232
import org.openqa.grid.web.Hub;
33+
import org.openqa.selenium.internal.BuildInfo;
3334
import org.openqa.selenium.remote.server.SeleniumServer;
3435
import org.openqa.selenium.remote.server.log.LoggingOptions;
3536
import org.openqa.selenium.remote.server.log.TerseFormatter;
@@ -75,6 +76,11 @@ public static void main(String[] args) throws Exception {
7576

7677
configureLogging(launcher.configuration);
7778

79+
BuildInfo buildInfo = new BuildInfo();
80+
log.info(String.format(
81+
"Selenium build info: version: '%s', revision: '%s'",
82+
buildInfo.getReleaseLabel(),
83+
buildInfo.getBuildRevision()));
7884
try {
7985
launcher.launch();
8086
} catch (Exception e) {

0 commit comments

Comments
 (0)