Currently I have RollingLogFileAppender configured to hold a max of 20 files 
PER HOUR as follows:
    <appender name="RollingLogFileAppender" 
type="log4net.Appender.RollingFileAppender">
      <file value="c:\logs\MyService.log" />
      <appendToFile value="true" />
      <rollingStyle value="Composite" />
      <maxSizeRollBackups value="20" />
      <maximumFileSize value="100KB" />
      <datePattern value="yyyyMMdd-HH" />
        ....
    </appender>
This configuration keeps last 20 files FOR EACH HOUR and hence the number of 
files add up indefinitely over time.
Is there a way to configure a absolute max number of total files (without 
regards to the rolling intervals)? I am looking to setup log4net to basically 
keep a max of last X number of files at any given point in time in the year or 
years.
Regards
Pranav

Reply via email to