|
@@ -9,6 +9,7 @@ import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
import org.slf4j.LoggerFactory;
|
|
|
|
|
|
|
|
import com.leanwo.management.util.CloseableUtil;
|
|
import com.leanwo.management.util.CloseableUtil;
|
|
|
|
|
+import com.leanwo.management.util.ThreadUtil;
|
|
|
|
|
|
|
|
public class StreamOutputThread extends Thread {
|
|
public class StreamOutputThread extends Thread {
|
|
|
private static Logger logger = LoggerFactory.getLogger(StreamOutputThread.class);
|
|
private static Logger logger = LoggerFactory.getLogger(StreamOutputThread.class);
|
|
@@ -41,8 +42,11 @@ public class StreamOutputThread extends Thread {
|
|
|
try {
|
|
try {
|
|
|
while (!stopFlag) {
|
|
while (!stopFlag) {
|
|
|
output = bufferedReader.readLine();
|
|
output = bufferedReader.readLine();
|
|
|
- if(output != null && logEvent != null) {
|
|
|
|
|
|
|
+ if(output != null && output.length() > 0 && logEvent != null) {
|
|
|
logEvent.appendLog(output);
|
|
logEvent.appendLog(output);
|
|
|
|
|
+ }else {
|
|
|
|
|
+ // add by jack 20190213
|
|
|
|
|
+ ThreadUtil.sleep(100l);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|