aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-process-monitor
diff options
context:
space:
mode:
authorSébastien Lesaint <sebastien.lesaint@sonarsource.com>2016-11-15 17:26:00 +0100
committerSébastien Lesaint <sebastien.lesaint@sonarsource.com>2016-11-16 10:09:21 +0100
commite332f961691387bfd755a938d8b4606f8c3c9732 (patch)
treee54b05b52618aeaf5dadbf092e44070fe20e3075 /server/sonar-process-monitor
parent91a6c35e590a92b02e7406133162d8d5ec2fb5ac (diff)
downloadsonarqube-e332f961691387bfd755a938d8b4606f8c3c9732.tar.gz
sonarqube-e332f961691387bfd755a938d8b4606f8c3c9732.zip
SONAR-8333 add info log when a subprocess fails to start
Diffstat (limited to 'server/sonar-process-monitor')
-rw-r--r--server/sonar-process-monitor/src/main/java/org/sonar/process/monitor/Monitor.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/server/sonar-process-monitor/src/main/java/org/sonar/process/monitor/Monitor.java b/server/sonar-process-monitor/src/main/java/org/sonar/process/monitor/Monitor.java
index 182155ff9fb..7f1d0b5853d 100644
--- a/server/sonar-process-monitor/src/main/java/org/sonar/process/monitor/Monitor.java
+++ b/server/sonar-process-monitor/src/main/java/org/sonar/process/monitor/Monitor.java
@@ -141,10 +141,14 @@ public class Monitor {
File tempDir = fileSystem.getTempDir();
this.launcher = new JavaProcessLauncher(TIMEOUTS, tempDir);
for (JavaCommand command : javaCommands) {
+ ProcessRef processRef = null;
try {
- ProcessRef processRef = launcher.launch(command);
+ processRef = launcher.launch(command);
monitor(processRef);
} catch (InterruptedException | RuntimeException e) {
+ if (processRef != null) {
+ LOG.info("{} failed to start", processRef);
+ }
// fail to start or to monitor
stop();
throw e;