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

Exits the the program without any error once the File is deleted/rotated on Ubuntu x86_64 GNU/Linux #90

Open
deep-patel opened this issue May 5, 2016 · 4 comments

Comments

@deep-patel
Copy link

deep-patel commented May 5, 2016

Exits the Program without throwing any error on Ubuntu Linux x86_64, though it works perfectly on Macintosh.

*Already Added these flags: *
Follow: true,
ReOpen: true

Last line to be printed by Lib is as below:

2016/05/05 11:41:38 Re-opening moved/deleted file /home/ubuntu/server/tomcat/apache-tomcat-7.0.69/logs/catalina.out ...
2016/05/05 11:41:38 Waiting for /home/ubuntu/server/tomcat/apache-tomcat-7.0.69/logs/catalina.out to appear...

After this it just exists without any error.

@deep-patel
Copy link
Author

Looking into detail I found that on deletion of the file inotify watcher is getting closed.

@willf
Copy link

willf commented May 5, 2016

I believe I am seeing the same problem with Follow: true, Reopen: true. In my code, it is transient when I set or unset a logger, which leads me to suspect that it's some kind of race condition.

@willf
Copy link

willf commented May 5, 2016

Also, setting Poll; true resolves the issue, which suggests @deep-patel is on to something.

@deep-patel
Copy link
Author

deep-patel commented May 6, 2016

thanks @willf, Poll: true do work for me now, also it would be great if this bug can be resolved.
Currently I am building a log aggregator for centralized log management for one of my projects, where I am using this lib.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants