Skip to content

Commit

Permalink
fix(logtail): Output multiline text on single inotify event
Browse files Browse the repository at this point in the history
Signed-off-by: Andrei Stan <[email protected]>
  • Loading branch information
andreistan26 committed Apr 10, 2024
1 parent 61bdb6a commit 9b5e55a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion internal/logtail/logtail.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
}
}
}
Expand Down

0 comments on commit 9b5e55a

Please sign in to comment.