Flush output from log handler more often
@@ -62,7 +62,6 @@ class LogReader {
double fromSeconds = from.getEpochSecond() + from.getNano() / 1e9;
double toSeconds = to.getEpochSecond() + to.getNano() / 1e9;
BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(out));
- try {
for (List<Path> logs : getMatchingFiles(from, to)) {
List<LogLineIterator> logLineIterators = new ArrayList<>();
try {
@@ -84,13 +83,10 @@ class LogReader {
for (LogLineIterator ll : logLineIterators) {
try { ll.close(); } catch (IOException ignored) { }
}
- }
- }
- }
- finally {
Exceptions.uncheck(writer::flush);
}
}
+ }
private static class LogLineIterator implements Iterator<LineWithTimestamp>, AutoCloseable {
