diff options
author | Simon Brandhof <simon.brandhof@sonarsource.com> | 2014-09-24 18:19:50 +0200 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@sonarsource.com> | 2014-09-24 18:19:50 +0200 |
commit | 85c037c87a728edbefc0fd417d6cb89cab246e44 (patch) | |
tree | e3522ce24ff20fe3d3d0647bee363dd74e28fdf1 /server/sonar-process-monitor | |
parent | 410c98978ca7ee3c667dcbcffe4d3ec085c6e517 (diff) | |
download | sonarqube-85c037c87a728edbefc0fd417d6cb89cab246e44.tar.gz sonarqube-85c037c87a728edbefc0fd417d6cb89cab246e44.zip |
SONAR-5621 Merge server log files into a single one
Diffstat (limited to 'server/sonar-process-monitor')
4 files changed, 3 insertions, 3 deletions
diff --git a/server/sonar-process-monitor/src/main/java/org/sonar/process/monitor/JavaProcessLauncher.java b/server/sonar-process-monitor/src/main/java/org/sonar/process/monitor/JavaProcessLauncher.java index 77a4b607d0d..3cedc1c9c84 100644 --- a/server/sonar-process-monitor/src/main/java/org/sonar/process/monitor/JavaProcessLauncher.java +++ b/server/sonar-process-monitor/src/main/java/org/sonar/process/monitor/JavaProcessLauncher.java @@ -49,7 +49,7 @@ public class JavaProcessLauncher { commands.prepare(); ProcessBuilder processBuilder = create(command); - LoggerFactory.getLogger(getClass()).info("Launch {}: {}", + LoggerFactory.getLogger(getClass()).info("Launch process[{}]: {}", command.getKey(), StringUtils.join(processBuilder.command(), " ")); process = processBuilder.start(); StreamGobbler inputGobbler = new StreamGobbler(process.getInputStream(), command.getKey()); diff --git a/server/sonar-process-monitor/src/main/java/org/sonar/process/monitor/ProcessRef.java b/server/sonar-process-monitor/src/main/java/org/sonar/process/monitor/ProcessRef.java index 672fdf6cb6c..31eae8e9ba3 100644 --- a/server/sonar-process-monitor/src/main/java/org/sonar/process/monitor/ProcessRef.java +++ b/server/sonar-process-monitor/src/main/java/org/sonar/process/monitor/ProcessRef.java @@ -90,7 +90,6 @@ class ProcessRef { ProcessUtils.sendKillSignal(process); // signal is sent, waiting for shutdown hooks to be executed (or not... it depends on OS) process.waitFor(); - LoggerFactory.getLogger(getClass()).info(String.format("%s is stopped", this)); } catch (InterruptedException ignored) { // can't wait for the termination of process. Let's assume it's down. diff --git a/server/sonar-process-monitor/src/main/java/org/sonar/process/monitor/StreamGobbler.java b/server/sonar-process-monitor/src/main/java/org/sonar/process/monitor/StreamGobbler.java index d5f54e33248..2115884b189 100644 --- a/server/sonar-process-monitor/src/main/java/org/sonar/process/monitor/StreamGobbler.java +++ b/server/sonar-process-monitor/src/main/java/org/sonar/process/monitor/StreamGobbler.java @@ -38,7 +38,7 @@ class StreamGobbler extends Thread { private final Logger logger; StreamGobbler(InputStream is, String processKey) { - this(is, processKey, LoggerFactory.getLogger(processKey)); + this(is, processKey, LoggerFactory.getLogger("gobbler")); } StreamGobbler(InputStream is, String processKey, Logger logger) { diff --git a/server/sonar-process-monitor/src/main/java/org/sonar/process/monitor/TerminatorThread.java b/server/sonar-process-monitor/src/main/java/org/sonar/process/monitor/TerminatorThread.java index b40291f164a..a774868f75a 100644 --- a/server/sonar-process-monitor/src/main/java/org/sonar/process/monitor/TerminatorThread.java +++ b/server/sonar-process-monitor/src/main/java/org/sonar/process/monitor/TerminatorThread.java @@ -68,6 +68,7 @@ class TerminatorThread extends Thread { LoggerFactory.getLogger(getClass()).info(String.format("%s failed to stop in a timely fashion. Killing it.", ref)); } ref.stop(); + LoggerFactory.getLogger(getClass()).info(String.format("%s is stopped", ref)); } } } |