Commits

Michael Heemskerk  committed a150a7d Merge

MERGE: merge 2.4 --> default (repo name in log messages)

  • Participants
  • Parent commits c573368, bd49052

Comments (0)

Files changed (3)

File processutils/pom.xml

File contents unchanged.

File processutils/src/main/java/com/atlassian/utils/process/LatchedRunnable.java

 package com.atlassian.utils.process;
 
 import org.apache.log4j.Logger;
+import org.apache.log4j.NDC;
 
+import java.util.Stack;
 import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.TimeUnit;
 
     private CountDownLatch latch = new CountDownLatch(1);
     private Thread runner;
     private boolean cancelled;
+    private Stack<?> ndcStack = NDC.cloneStack();
 
     public final void run() {
         try {
+            NDC.inherit(ndcStack);
             runner = Thread.currentThread();
             doTask();
         } finally {
             latch.countDown();
+            NDC.remove();
         }
     }
 

File processutils/src/main/java/com/atlassian/utils/process/LineOutputHandler.java

 package com.atlassian.utils.process;
 
-import org.apache.commons.io.IOUtils;
-
 import java.io.Closeable;
 import java.io.InputStream;
 import java.io.BufferedReader;
 import java.io.IOException;
 import java.io.InterruptedIOException;
 import java.io.UnsupportedEncodingException;
-import java.nio.Buffer;
 
 /**
  * An Output Handler which breaks the output from the process into