diff --git a/src/logs/log_file_watcher.rs b/src/logs/log_file_watcher.rs index 5e3439f..42e291c 100644 --- a/src/logs/log_file_watcher.rs +++ b/src/logs/log_file_watcher.rs @@ -161,6 +161,11 @@ impl LogWatcher { } }; + while let Ok(Some(_)) = self.state.lines.next_line().await { + // There are occasional spurious file creation events, so reading + // from the beginning would read lines that were already counted. + } + continue 'read_loop; } }