-
Notifications
You must be signed in to change notification settings - Fork 86
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
Reopen log file when rotation is detected #127
Conversation
9b4c0d5
to
0ded7a6
Compare
I'll review this PR, just wait for a while. |
bf05cbe
to
c2c5266
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It may be useful to explain why extending behavior with a module and that intention a bit in the commit message.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I support this approach, could you solve the remaining concerns?, then it is OK for me.
Added in 8842081 |
I've noticed that the current patch isn't enough. |
31502fc
to
e2e8824
Compare
Fixed in e2e8824 |
In the previous vesions, there was no way to detect log rotation event when log file was rotated by external tool (logrotate) It causes that DaemonLogger continues to write logs to rotated file even even when it's already renamed or removed, it's not expected behavior. This commit fixes by reopening log file when inode is changed. Signed-off-by: Takuro Ashie <[email protected]>
This is another solution for #106 to avoid using inotify.
Fix #106