question: private void handleProcessError ( JobDefinition job , Process process ) throws IOException { StringBuffer sb = new StringBuffer ( ) ; BufferedReader in = new BufferedReader ( new InputStreamReader ( process . getInputStream ( ) ) ) ; int data = 0 ; while ( data != - 1 && ! isInterrupted ( ) ) { data = in . read ( ) ; if ( data != - 1 ) { sb . append ( ( char ) data ) ; } } logger . warn ( "Job ended with erroneous exit code: " + job . cut + "\nProcess console output:\n" + sb . toString ( ) ) ; }
target:  Print process console output if it died, as its logs on disks might not have been generated yet