Closed ShadowDancer closed 3 years ago
A classic practice is to monitor it externally, which I believe is possible. However, this is certainly cumbersome. Shall we add a retainedFileCountLimit?
This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 7 days.
RollingFile should have limits, like last month, or 1gb max, to not drain disk space on customers machine. I think this is critical to have if this lib is meant to be used in production environments.
I think this is not good way to deal with log rotation. Especially if you have something misbehaving (generating lots of logs), the only solution is to react before disk fills up.
To solve this from outside it would be really hard to get right, as it cannot be just solved with cron job, it needs active monitoring and dealing with locked files, whereas log process already knows file masks and can correctly compute file sizes and stop logging when attempting to roll.
I think the right thing to do is stop logging, because if something is misbehaving and creating lots of log files probably cause of the problem is much more useful. If logger would remove younger logs, it could hide the cause of problem with lots of gibberish.