aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-application/src
diff options
context:
space:
mode:
authorStephane Gamard <stephane.gamard@searchbox.com>2014-07-28 11:58:31 +0200
committerStephane Gamard <stephane.gamard@searchbox.com>2014-07-28 11:58:31 +0200
commitd1ab37abc38e07859840e69a8d0a0f9c133adc4d (patch)
tree28a12dd5868e0196f77784bc21009d8a82ccb993 /sonar-application/src
parentee22775511a450b165b3543d77522a7dbada3908 (diff)
downloadsonarqube-d1ab37abc38e07859840e69a8d0a0f9c133adc4d.tar.gz
sonarqube-d1ab37abc38e07859840e69a8d0a0f9c133adc4d.zip
SONAR-4898 - Integrated Logging class
Diffstat (limited to 'sonar-application/src')
-rw-r--r--sonar-application/src/main/java/org/sonar/application/App.java14
1 files changed, 9 insertions, 5 deletions
diff --git a/sonar-application/src/main/java/org/sonar/application/App.java b/sonar-application/src/main/java/org/sonar/application/App.java
index d0ff82cb8ac..71e84c4e585 100644
--- a/sonar-application/src/main/java/org/sonar/application/App.java
+++ b/sonar-application/src/main/java/org/sonar/application/App.java
@@ -72,7 +72,9 @@ public class App implements ProcessMXBean {
public void start() {
- LOGGER.info("Starting search server");
+ Logger logger = LoggerFactory.getLogger(getClass());
+
+ logger.info("Starting search server");
elasticsearch = new ProcessWrapper(SONAR_SEARCH_PROCESS)
.setWorkDir(installation.homeDir())
.setJmxPort(Integer.parseInt(installation.prop(DefaultSettings.ES_JMX_PORT_KEY)))
@@ -85,9 +87,9 @@ public class App implements ProcessMXBean {
.addClasspath(installation.starPath("lib/search"))
.execute();
monitor.registerProcess(elasticsearch);
- LOGGER.info("Search server is ready");
+ logger.info("Search server is ready");
- LOGGER.info("Starting web server");
+ logger.info("Starting web server");
server = new ProcessWrapper(SONAR_WEB_PROCESS)
.setWorkDir(installation.homeDir())
.setJmxPort(Integer.parseInt(installation.prop(DefaultSettings.WEB_JMX_PORT_KEY)))
@@ -105,7 +107,7 @@ public class App implements ProcessMXBean {
.addClasspath(installation.starPath("lib/server"))
.execute();
monitor.registerProcess(server);
- LOGGER.info("Web server is ready");
+ logger.info("Web server is ready");
monitor.start();
@@ -122,6 +124,8 @@ public class App implements ProcessMXBean {
@Override
public void terminate() {
+ Logger logger = LoggerFactory.getLogger(getClass());
+
if (monitor != null) {
monitor.interrupt();
monitor = null;
@@ -131,7 +135,7 @@ public class App implements ProcessMXBean {
if (server != null) {
server.terminate();
}
- LOGGER.info("Stopping SonarQube main process");
+ logger.info("Stopping SonarQube main process");
}
}