Merge pull request #1935 from gianm/unbuffered-ftr-logging

ForkingTaskRunner: Log without buffering.
This commit is contained in:
Xavier Léauté 2015-11-07 17:17:24 -08:00
commit 7816d67148
1 changed files with 1 additions and 1 deletions

View File

@ -260,7 +260,7 @@ public class ForkingTaskRunner implements TaskRunner, TaskLogStreamer
log.info("Logging task %s output to: %s", task.getId(), logFile);
boolean runFailed = true;
try (final OutputStream toLogfile = Files.asByteSink(logFile).openBufferedStream()) {
try (final OutputStream toLogfile = Files.asByteSink(logFile).openStream()) {
ByteStreams.copy(processHolder.process.getInputStream(), toLogfile);
final int statusCode = processHolder.process.waitFor();
log.info("Process exited with status[%d] for task: %s", statusCode, task.getId());