Skip to content

Commit 809c655

Browse files
committed
fix(logtail): Output multiline text on single inotify event
Signed-off-by: Andrei Stan <[email protected]>
1 parent 951f8b0 commit 809c655

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

internal/logtail/logtail.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,11 @@ func NewLogTail(ctx context.Context, logFile string) (chan string, chan error, e
6464

6565
switch event.Op {
6666
case fsnotify.Write:
67-
peekAndRead(f, reader, &logs, &errs)
67+
for {
68+
if peekAndRead(f, reader, &logs, &errs) {
69+
break
70+
}
71+
}
6872
}
6973
}
7074
}

0 commit comments

Comments
 (0)