]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-8333 add info log when a subprocess fails to start
authorSébastien Lesaint <sebastien.lesaint@sonarsource.com>
Tue, 15 Nov 2016 16:26:00 +0000 (17:26 +0100)
committerSébastien Lesaint <sebastien.lesaint@sonarsource.com>
Wed, 16 Nov 2016 09:09:21 +0000 (10:09 +0100)
server/sonar-process-monitor/src/main/java/org/sonar/process/monitor/Monitor.java

index 182155ff9fb5929e9861a28cc4a360f6293f3cf7..7f1d0b5853d601d18ddfd51ec51b2b47a41d7d0a 100644 (file)
@@ -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;