The Log4Net mailing list is a great source of information about using log4Net, in this forum we collect all the messages in the log4net user list and some selected threads from the developer list.
| Author |
Messages |
|
Navin Mishra
 |
| 03/25/2009 12:46 AM |
|
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
|
|
|
|
|
Dean Fiala
 |
| 03/25/2009 3:39 PM |
|
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>
for more property settings.
HTH,
Dean Fiala |
|
|
|
|
Bruno Baia
 |
|
Navin Mishra
 |
| 03/25/2009 5:18 PM |
|
Thanks for response. Has somebody tried that and see if it works ? Another note pointed to documentation that it is not supported!?
Thanks again and regards
Navin
|
|
|
|
|
|
| You are not authorized to post a reply. |
|
|
|
ActiveForums 3.7
|