logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nicko Cadell" <ni...@neoworks.com>
Subject RE: Log files misnamed
Date Tue, 05 Jul 2005 15:30:48 GMT
Baron,

Does this issue arise each time you restart your service or just
sometimes when you restart?
Does this issue occur if you write to a local disk rather than a share?
What OS and file system is the logs share using?
Does the appender write the current logs into the incorrectly named
file? or does it also create the correctly named file?

Cheers,

Nicko

> -----Original Message-----
> From: Baron Schwartz [mailto:baron@sequent.org] 
> Sent: 27 June 2005 20:01
> To: log4net-user@logging.apache.org
> Subject: Log files misnamed
> 
> 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