From e332f961691387bfd755a938d8b4606f8c3c9732 Mon Sep 17 00:00:00 2001 From: =?utf8?q?S=C3=A9bastien=20Lesaint?= Date: Tue, 15 Nov 2016 17:26:00 +0100 Subject: [PATCH] SONAR-8333 add info log when a subprocess fails to start --- .../src/main/java/org/sonar/process/monitor/Monitor.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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; -- 2.39.5