I only want log4net to keep let's say 10 days-worth of log files as keeping them growing indefinitely will eventually eat up my disk space. I had thought that I could do this by setting
<maxSizeRollBackups value="10" />
on my RollingFileAppender but no dice. How do I do this?
Take a look at this similar post for answers.
Make sure you are not rolling the logs by Date as per the SDK:
A maximum number of backup files when rolling on date/time boundaries is not supported.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With