diff options
author | Aurelien Poscia <aurelien.poscia@sonarsource.com> | 2022-03-15 08:40:06 +0100 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2022-03-18 20:02:58 +0000 |
commit | 87d3bfccdbac9d330e9ad5a78da0ebbcac4d8284 (patch) | |
tree | f1b15343d98283eda2be5ac6ef5c707eb98d1f37 /server/sonar-webserver | |
parent | 3cd52ef6dab2fe5b7369141819fdf8f30b484f90 (diff) | |
download | sonarqube-87d3bfccdbac9d330e9ad5a78da0ebbcac4d8284.tar.gz sonarqube-87d3bfccdbac9d330e9ad5a78da0ebbcac4d8284.zip |
SONAR-10179 improve consistency of start/stop log messages and identifiers of processes
Author: Aurelien Poscia <aurelien.poscia@sonarsource.com>
Diffstat (limited to 'server/sonar-webserver')
-rw-r--r-- | server/sonar-webserver/src/main/java/org/sonar/server/app/WebServer.java | 4 | ||||
-rw-r--r-- | server/sonar-webserver/src/main/java/org/sonar/server/platform/PlatformImpl.java | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/server/sonar-webserver/src/main/java/org/sonar/server/app/WebServer.java b/server/sonar-webserver/src/main/java/org/sonar/server/app/WebServer.java index 841be2b21b6..be02a3969df 100644 --- a/server/sonar-webserver/src/main/java/org/sonar/server/app/WebServer.java +++ b/server/sonar-webserver/src/main/java/org/sonar/server/app/WebServer.java @@ -30,6 +30,8 @@ import org.sonar.process.ProcessId; import org.sonar.process.Props; import org.sonar.process.sharedmemoryfile.DefaultProcessCommands; +import static org.sonar.process.ProcessId.WEB_SERVER; + public class WebServer implements Monitored { public static final String PROPERTY_SHARED_PATH = "process.sharedDir"; @@ -76,7 +78,7 @@ public class WebServer implements Monitored { public void stop() { // hard stop is as graceful as stop for the WebServer hardStop(); - LoggerFactory.getLogger(WebServer.class).info("WebServer stopped"); + LoggerFactory.getLogger(WebServer.class).info("{} stopped", WEB_SERVER.getHumanReadableName()); } @Override diff --git a/server/sonar-webserver/src/main/java/org/sonar/server/platform/PlatformImpl.java b/server/sonar-webserver/src/main/java/org/sonar/server/platform/PlatformImpl.java index f691b8e942b..0d422108d49 100644 --- a/server/sonar-webserver/src/main/java/org/sonar/server/platform/PlatformImpl.java +++ b/server/sonar-webserver/src/main/java/org/sonar/server/platform/PlatformImpl.java @@ -40,6 +40,8 @@ import org.sonar.server.platform.platformlevel.PlatformLevel4; import org.sonar.server.platform.platformlevel.PlatformLevelSafeMode; import org.sonar.server.platform.platformlevel.PlatformLevelStartup; +import static org.sonar.process.ProcessId.WEB_SERVER; + /** * @since 2.2 */ @@ -106,7 +108,7 @@ public class PlatformImpl implements Platform { // switch current container last to avoid giving access to a partially initialized container runIfNotAborted(() -> { currentLevel = level4; - LOGGER.info("WebServer is operational"); + LOGGER.info("{} is operational", WEB_SERVER.getHumanReadableName()); }); // stop safemode container if it existed |