logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pranav Varia <Pranav.Va...@microsoft.com>
Subject Question about RollingLogFileAppender
Date Wed, 04 Jun 2008 17:13:47 GMT
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

Mime
View raw message