-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Add log rotation and switch to flexi_logger #6702
Conversation
|
@pscott what happened to doing it the standard linux way? e.g. a SIGUP flushes and logrotate rotates. |
Since this comment said:
I thought using flexi_logger with custom log rotation was the way to go. I think there's no clear consensus atm (see original issue), so this PR is here because the work was already done, but we could as well decide not to merge it. If I understand @ddorgan you'd want SIGUP to flush and rotate? No custom "rotation" provided out of the box? PS: stupid question but how would this work on windows? (I have no idea how logs are usually handled on windows...) |
|
Since |
|
closing because of inactivity. |
This PR adds the option to rotate logs. It does so by switching to another crate for loggin (previously
env_logger, nowflexi_logger).A similar PR was already merged and reverted.
I would ask the reviewers to:
--log,--log-directory,--log-age, and--log-size). (cc @ddorgan )This PR also fixes the problem of:
AgeOrSize: if--log-ageAND--log-sizeare specified, the log rotation will happen once either the AGE or the SIZE gets reached.Closes #5926
polkadot companion: paritytech/polkadot#1450