logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Baron Schwartz <ba...@sequent.org>
Subject Log files misnamed
Date Mon, 27 Jun 2005 19:00:49 GMT
I have a RollingFileAppender configured as follows:


     <log4net>
         <appender name="FileAppender" 
type="log4net.Appender.RollingFileAppender">
             <file value="//tank/logs$/seo/log-" />
             <appendToFile value="true" />
             <datePattern value="yyyy-MM-dd'.txt'" />
             <rollingStyle value="Date" />
             <staticLogFileName value="false" />
             <layout type="log4net.Layout.PatternLayout">
                 <conversionPattern value="%-5p %d %c line %L%n 
%m%n" />
             </layout>
         </appender>
         <appender name="SmtpAppender" type="log4net.Appender.SmtpAppender">
             <to value="[edit]" />
             <from value="[edit]" />
             <subject value="SEO error" />
             <smtpHost value="madrid" />
             <bufferSize value="2" />
             <lossy value="true" />
             <evaluator type="log4net.Core.LevelEvaluator">
                 <threshold value="WARN"/>
             </evaluator>
             <layout type="log4net.Layout.PatternLayout">
                 <conversionPattern value="%-5p %d %c line %L%n 
%m%n" />
             </layout>
         </appender>
         <root>
             <level value="ERROR" />
             <appender-ref ref="FileAppender" />
             <appender-ref ref="SmtpAppender" />
         </root>
         <logger name="SeoLibrary">
             <level value="INFO" />
         </logger>
     </log4net>

It should (and usually does) produce files named thusly:

log-2005-06-27.txt

But every now and again, when I restart the service that's doing the 
logging, it makes a new file named incorrectly:

log-2005-06-27.txt2005-06-27.txt

What do you think?  It's not a real problem for me, but maybe it is a bug.

Thanks
Baron

Mime
View raw message