rolling by size/date
"Alex Ben-Ari" <[email protected]> Tue, 27 Jan 2004 12:35:53 +0100
| Newsgroups | gmane.comp.windows.dotnet.log4net.user |
|---|---|
| Message-ID | <[email protected]> |
Is it possible to roll by size and still have the date specified in the DatePattern param of the RollingLogFileAppender still appear as part of the filename ? Another, related issue: I understand from the documentation that for the RollingFileAppender The DatePattern property somehow determines the policy of rolling, but I cannot understand what the rule is. I need my file to roll every day at midnight but how do I specify this ? The configuration below seems to roll the file very very often. Is it because the DatePattern param contains seconds ? What is the rule here ? My relevant configuration section is: <appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender"> <param name="File" value="..\\logs\\FlowMgr_log" /> <param name="AppendToFile" value="true" /> <param name="MaxSizeRollBackups" value="20" /> <param name="DatePattern" value="-ddMMyyTHHmmSS".txt""/> <param name="RollingStyle" value="Date" /> <param name="StaticLogFileName" value="false" /> <layout type="log4net.Layout.PatternLayout"> <param name="ConversionPattern" value="%d [%t] %-5p %c [%x] - %m%n" /> </layout> </appender> thanks in advance for any help, Alex. ------------------------------------------------------- The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. http://www.eclipsecon.org/osdn