Log4net RollingFileAppender doesn't roll over anymore after a couple of weeks
Posted
by Rocko
on Stack Overflow
See other posts from Stack Overflow
or by Rocko
Published on 2010-03-22T14:23:54Z
Indexed on
2010/06/10
3:13 UTC
Read the original article
Hit count: 303
log4net
|rollingfileappender
Hello,
I'm using log4net (v1.2.9.0) in a web project. Everything works like a charm, but after a couple of weeks the RollingFileAppender stops to roll over. Instead every log message is appended to the same file which therefore has a giant size by now.
Here is my log4net configuration:
<?xml version="1.0" encoding="utf-8"?>
<log4net>
<appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender">
<param name="File" value="C:\\Documents and Settings\\All Users\\Application Data\\CAPServer\\log\\CWSServer.log"/>
<param name="AppendToFile" value="true"/>
<param name="MaxSizeRollBackups" value="50"/>
<param name="RollingStyle" value="Date"/>
<param name="DatePattern" value="yyyyMMdd"/>
<param name="StaticLogFileName" value="true"/>
<layout type="log4net.Layout.PatternLayout">
<param name="ConversionPattern" value="%d{dd.MM.yyyy HH:mm:ss} [%t] %-5p %c{1} - %m%n"/>
</layout>
</appender>
<root>
<level value="ALL"/>
<appender-ref ref="RollingLogFileAppender"/>
</root>
</log4net>
Can you help?
Thanks in advance, Rocko
© Stack Overflow or respective owner