diff --git a/internal/logtail/logtail.go b/internal/logtail/logtail.go index f19999115..3443bf67b 100644 --- a/internal/logtail/logtail.go +++ b/internal/logtail/logtail.go @@ -64,7 +64,11 @@ func NewLogTail(ctx context.Context, logFile string) (chan string, chan error, e switch event.Op { case fsnotify.Write: - peekAndRead(f, reader, &logs, &errs) + for { + if peekAndRead(f, reader, &logs, &errs) { + break + } + } } } }