@@ -56,10 +56,11 @@ public void execute(List<String> cmdLine, final File workingDir,
5656 cmdLine = validateArgs (cmdLine );
5757 ProcessBuilder processBuilder = new ProcessBuilder (cmdLine );
5858 processBuilder .directory (workingDir );
59- logger .debug (PREFIX + "Setup ProcessBuilder with \" {}\" command in {} directory" , cmdLine , workingDir .getAbsolutePath ());
59+ logger .debug ("{}Setup ProcessBuilder with \" {}\" command in {} directory" , PREFIX , cmdLine ,
60+ workingDir .getAbsolutePath ());
6061 try {
6162 Process process = processBuilder .start ();
62- logger .info (PREFIX + " Starting Process - {}" , process );
63+ logger .info ("{} Starting Process - {}", PREFIX , process );
6364 ExecutorService executorService = Executors .newFixedThreadPool (2 );
6465 printStream (executorService , new StreamPrintService (process .getInputStream (), inputPrintAction ));
6566 printStream (executorService , new StreamPrintService (process .getErrorStream (), errorPrintAction ));
@@ -93,9 +94,9 @@ private void printStream(ExecutorService executorService, StreamPrintService pri
9394
9495 private void throwIfTimeOut (Future <?> future ) {
9596 try {
96- future .get (3 , TimeUnit . SECONDS );
97- } catch (ExecutionException | InterruptedException | TimeoutException e ) {
98- logger .warn (PREFIX + "Timed out waiting for input stream to be closed." );
97+ future .get ();
98+ } catch (ExecutionException | InterruptedException e ) {
99+ logger .warn ("{}An exception occurred during the execution of the command" , PREFIX , e );
99100 }
100101 }
101102
0 commit comments