-
Notifications
You must be signed in to change notification settings - Fork 87
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
Logrotate #26
Comments
nothing special, how it should work? |
in 0.5.1 added for eye self-log (for processes need to think more) example:
|
Wow that's good, thanks man! Might be helpful if there is an option of daily rotation. Process is quite important as well. |
No biggie, just wondering why you don't use some standard logger library like the one from the core so that you can re-use all functionalities. http://www.ruby-doc.org/stdlib-1.9.3/libdoc/logger/rdoc/Logger.html |
for self-log already used two options: http://www.ruby-doc.org/stdlib-1.9.3/libdoc/logger/rdoc/Logger.html#method-c-new-label-Synopsis |
Oh ok, thanks! Hopefully you can find a way to make process log work. If you already have some ideas, you might want point it here so I can give it a try. |
@phungleson You can usually use syslog-ng copytruncate strategy to rotate logs without having to instruct processes to reopen their file descriptors. Copytruncate just copies the original logfile for archiving and then truncates the original logfile, so the app can keep writing to the same file descriptor. I haven't used eye yet, so not sure if this will help you. |
What about Say eye-logrotate is a BASH script, it gets stdin, writes to main log file and rotate/compress old log data? |
|
Process.fork do
start_command "sh -c 'monitored-process | eye-logrotate' "
end will this work? Also if this is important to you, as another approach, we can rotate logs before starting processes. So maybe not in realtime, but at least each time processes get restarted logs get rotated. |
solved by gem https://github.com/kostya/eye-rotate |
Thanks! |
Hi guys, just want to check if eye has configuration to rotate all log files from code instead of setting up some other 3rd party process.
The text was updated successfully, but these errors were encountered: