We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
repro:
touch test.log ./go-tail -F ./test.log & date > test.log Fri Sep 15 13:26:55 EDT 2017 mv test.log test.log0 ; touch test.log open ./test.log: no such file or directory date >> test.log # tail is hung/crashed, doesn't exit
Expected: no error, and date to be outputted twice.
The text was updated successfully, but these errors were encountered:
This error is related to this lines of code: https://github.com/papertrail/go-tail/blob/master/follower/follower.go#L202-L210
Basically it detects the error but it doesn't do anything about it
Sorry, something went wrong.
I was able to fix this by adding a hack (sleep) after line 204:
default: if !t.config.Reopen { return nil } time.Sleep(30 * time.Second) if err := t.rewatch(); err != nil { return err }
This way if the file is moved (and then moved back) in 10s it gets reopened.
No branches or pull requests
repro:
Expected: no error, and date to be outputted twice.
The text was updated successfully, but these errors were encountered: