logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Gerler" <dger...@gmail.com>
Subject Using RollingFileAppender with style=Date.
Date Wed, 02 Dec 2009 16:01:35 GMT
How do I make it only keep a certain number of files when using the
rollingstyle = date? I've looked on the website and have not been able to
find an example of anything talking about it. This is what I have now:


    <appender name="Communications"

                <file value="c:/log/register/gis/communications.txt" />

                <appendToFile value="true" />

                 <maxSizeRollBackups value="10" />

<rollingStyle value="Date" />

                 <datePattern value="yyyyMMdd-HHmm" /> 

                <layout type="log4net.Layout.PatternLayout">

                                <header value="[Header]&#xD;&#xA;" />

                                <footer value="[Footer]&#xD;&#xA;" />

                                <conversionPattern value="%date [%thread]
%-5level %logger (%file:%line) - %message%newline" />




It doesn't delete the files when I get to 10.

View raw message