views:

136

answers:

1

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?

+2  A: 

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.

Sanjay Sheth
Thanks, though I don't necessarily need date/time boundaries, file number boundaries or total size boundaries will do just fine.
George Mauer