Skip to content

Commit

Permalink
Fix over-optimistic log message. (apache#3963)
Browse files Browse the repository at this point in the history
"Wrote task log" could be logged before the output stream is flushed and
closed, which could generate an error and not actually write the log.
  • Loading branch information
gianm authored Feb 22, 2017
1 parent edb032b commit f21641f
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,9 @@ public void pushTaskLog(String taskId, File logFile) throws IOException
final OutputStream out = fs.create(path, true)
) {
ByteStreams.copy(in, out);
log.info("Wrote task log to: %s", path);
}

log.info("Wrote task log to: %s", path);
}

@Override
Expand Down

0 comments on commit f21641f

Please sign in to comment.