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 7952808 commit f32e678
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 f32e678

Please sign in to comment.