-
-
Notifications
You must be signed in to change notification settings - Fork 915
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 File Rotation. #465
Comments
Original comment by |
Original comment by
|
I think a daily log rotation by default would help everyone. Hope it will be implemented very soon ;) |
The usual way to do this is to let logrotate rename the log file (no copying, no truncation) and then trigger the daemon (e.g. via a SIGHUP) to re-open its log files. |
Yes,... but how to trigger without restarting all the OpenZwave process? |
2016-04-18 17:33 GMT+02:00 Michael P. notifications@github.com:
|
Signal Handlers in a Library are a bad idea. What if the Application wants to do something different with SIGHUP? When I do this, it will be a function call. Upto the application to decide when to call the function. CopyTruncate option of LogRotate probably wont work (anymore) as one of the enhancements we made recently was to keep the LogFile Open while OZW is running... (we use to Open/Write/Close on every log message, but thats pretty inefficient) |
Yes, right. I think a function call will be the best. Thanks! |
From logrotate doc : It can be used when some program cannot be told to close its logfile and 2016-04-19 15:05 GMT+02:00 Michael P. notifications@github.com:
|
@bibi21000 : this will not work, file size will be after rotation the same as before - but empty file content. New log will be attached to the end of this file. That's why a OZW function is needed ;) |
So ... please add an helper in manager for wrappers : we should be abble to 2016-04-19 15:51 GMT+02:00 Michael P. notifications@github.com:
|
Hi, Thanks! |
@Fishwaldo : can you please tell us - can it be implemented? Is it a hard job? Thanks! |
Any news on this? |
@Fishwaldo Can you work with this? #1946 |
As a workaround - haven't fully tested it yet - adding |
Update: Logrotate confirmed working (on linux) with the above mentioned settings. |
@electrofloat thank you for reporting back. I never got round to testing "copytruncate" so you're feedback is much appreciated! Somewhat related to this Log Rotation... On my "wish list for a next-gen OpenZWave 🙂 " I would like to have these changes:
It is one of those things that are "easier said than done". |
Original issue reported on code.google.com by
martywes...@gmail.com
on 24 Feb 2015 at 6:28The text was updated successfully, but these errors were encountered: