Skip to content

Commit

Permalink
Log the build revision and version number on start up.
Browse files Browse the repository at this point in the history
This means that people can tell which version of selenium they
are using when they start the server.
  • Loading branch information
shs96c committed Jun 25, 2016
1 parent 4243f8c commit 2e2ab01
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ private static Properties loadBuildProperties() {

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

/** @return The embedded build revision or "unknown". */
Expand Down
6 changes: 6 additions & 0 deletions java/server/src/org/openqa/grid/selenium/GridLauncherV3.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import org.openqa.grid.internal.utils.configuration.StandaloneConfiguration;
import org.openqa.grid.shared.CliUtils;
import org.openqa.grid.web.Hub;
import org.openqa.selenium.internal.BuildInfo;
import org.openqa.selenium.remote.server.SeleniumServer;
import org.openqa.selenium.remote.server.log.LoggingOptions;
import org.openqa.selenium.remote.server.log.TerseFormatter;
Expand Down Expand Up @@ -75,6 +76,11 @@ public static void main(String[] args) throws Exception {

configureLogging(launcher.configuration);

BuildInfo buildInfo = new BuildInfo();
log.info(String.format(
"Selenium build info: version: '%s', revision: '%s'",
buildInfo.getReleaseLabel(),
buildInfo.getBuildRevision()));
try {
launcher.launch();
} catch (Exception e) {
Expand Down

0 comments on commit 2e2ab01

Please sign in to comment.