You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by cw...@apache.org on 2018/10/03 19:50:26 UTC

svn commit: r1842755 - /uima/uima-ducc/trunk/uima-ducc-agent/src/main/java/org/apache/uima/ducc/agent/RogueProcessReaper.java

Author: cwiklik
Date: Wed Oct  3 19:50:26 2018
New Revision: 1842755

URL: http://svn.apache.org/viewvc?rev=1842755&view=rev
Log:
UIMA-5878 logs output from an external reaper script

Modified:
    uima/uima-ducc/trunk/uima-ducc-agent/src/main/java/org/apache/uima/ducc/agent/RogueProcessReaper.java

Modified: uima/uima-ducc/trunk/uima-ducc-agent/src/main/java/org/apache/uima/ducc/agent/RogueProcessReaper.java
URL: http://svn.apache.org/viewvc/uima/uima-ducc/trunk/uima-ducc-agent/src/main/java/org/apache/uima/ducc/agent/RogueProcessReaper.java?rev=1842755&r1=1842754&r2=1842755&view=diff
==============================================================================
--- uima/uima-ducc/trunk/uima-ducc-agent/src/main/java/org/apache/uima/ducc/agent/RogueProcessReaper.java (original)
+++ uima/uima-ducc/trunk/uima-ducc-agent/src/main/java/org/apache/uima/ducc/agent/RogueProcessReaper.java Wed Oct  3 19:50:26 2018
@@ -25,6 +25,7 @@ import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
+import java.util.Objects;
 import java.util.TreeMap;
 import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.atomic.AtomicInteger;
@@ -322,10 +323,14 @@ public class RogueProcessReaper {
           }
           is = shellProcess.getInputStream();
           reader = new BufferedReader(new InputStreamReader(is));
-
+          String scriptOutput = "";
           // read the next line from stdout and stderr
-          while (reader.readLine() != null) {
-            // dont care about the output, just drain the buffers
+          while ( (scriptOutput = reader.readLine()) != null) {
+        	  if ( Objects.nonNull(logger)) {
+            	  logger.info(methodName, null,scriptOutput);
+        	  } else {
+        		  System.out.println(">>>>"+scriptOutput);
+        	  }
           }
          
           sb.setLength(0);