Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

log rotate loss log, tail not stop or kill, why deleted signal lost[hpcloud/tail v1.0.0] #74

Open
wl-lei opened this issue Jul 4, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@wl-lei
Copy link

wl-lei commented Jul 4, 2024

Describe the bug
I’ve encountered an intermittent issue with log collection loss during log rotation when using the [hpcloud/tail v1.0.0] library, tail is not stop or kill.
I’ve reviewed previous issues, namely issue 94[https://github.com/hpcloud/tail/issues/94] and issue 97[https://github.com/hpcloud/tail/issues/97], and after analyzing the source code of tail, I’m unable to consistently reproduce the problem. I don’t understand how the ‘deleted’ signal could be getting lost.
The configuration for tail is as follows, using the polling mechanism:
tailFile, err := tail.TailFile(logPath, tail.Config{
ReOpen: true,
Follow: true,
Location: &tail.SeekInfo{Offset: 0, Whence: 2},
MustExist: false,
Poll: true,
})

Expected behaviour
I’m wondering if the nxadm/tail has addressed this issue, and I would appreciate it if the experts could help explain the above-mentioned problem.

@wl-lei wl-lei added the bug Something isn't working label Jul 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant