|
Hello, I am using the RollingFileAppender and trying to accomplish
the following: I want my log files to be rolled over daily, and then
overwritten/deleted each week. i.e. I only want to keep 7 backup log files. Looking at the SDK documentation, it suggests that MaxSizeRollBackups
should work. I have the following in my XML Config file (I’m using
rollover by the minute level for testing). I can’t seem to get it to
work. Suggestions?
<appender name="DebugRollingAppender"
type="log4net.Appender.RollingFileAppender">
<param name="File" value="logs/nVision.log" />
<param name="AppendToFile"
value="true" />
<param name="RollingStyle"
value="Composite" />
<param
name="MaxSizeRollBackups" value="1" />
<param name="datePattern"
value="yyyyMMdd-HHmm'.log'" />
<param name="staticLogFileName" value="true" />
<layout type="log4net.Layout.PatternLayout">
<param name="Header" value="[Log Start]%newline"
type="log4net.Util.PatternString"/>
<param name="Footer" value="[Log End]%newline"
type="log4net.Util.PatternString"/>
<param name="ConversionPattern" value="%d %-5p (%C{1}:%M:%L)
- %m%n" />
</layout>
</appender> p.s. I believe I have v 1.2.9, downloaded ~June2005. Thanks! Raymond |
- RollingFileAppender - MaxSizeRollBakups Raymond Chan - Symmetrics
- RE: RollingFileAppender - MaxSizeRollBakups Nicko Cadell
