Hi,

Documentation says it's not supported :
"A maximum number of backup files when rolling on date/time boundaries is
not supported."

http://logging.apache.org/log4net/release/sdk/log4net.Appender.RollingFileAppender.html


- Bruno

2009/3/25 Dean Fiala <dfi...@celadonlabs.com>

>      This is a configuration for an apprender will roll the file every day
> and keep 5 days of logs.
>
> <appender name="RollingFile" type="log4net.Appender.RollingFileAppender">
>         <file value="/logs/yourlogfile.log" />
>         <appendToFile value="true" />
>   <rollingStyle value="Date" />
>   <datePattern value="yyyyMMdd" />
>   <maxSizeRollBackups value="5" />
>         <layout type="log4net.Layout.PatternLayout">
>             <conversionPattern value="%d{MM/dd/yyyy HH:mm:ss}: %p %t  %c{1}
> - %m%n" />
>         </layout>
>      </appender>
>
>
> Check out
> http://logging.apache.org/log4net/release/sdk/log4net.Appender.RollingFileAppender.html
>
> for more property settings.
>
> HTH,
>
> Dean Fiala
>
>  ------------------------------
> *From:* Navin Mishra [mailto:navin_m...@yahoo.com]
> *Sent:* Tuesday, March 24, 2009 7:47 PM
> *To:* log4net-user@logging.apache.org
> *Subject:* Rolling log files based on date
>
>  Hi,
>
>   I want to have a log4net log file 1 per day and I want to preserve
> log4net log files for the last 5 days only. Could log4net rolling file
> appender could be configured to do that ?
>
> Thanks in advance and regards
>
> Navin
>
>

Reply via email to