logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Morten Andersen <mor...@vianett.no>
Subject Re: log4net 1.2.10 overwriting instead of rolling over
Date Fri, 15 Sep 2006 19:32:15 GMT
What tail program do you use? If the program locks the file log4net 
cannot roll the files.

After having the same problem I started to use mtail. This solved the 
problem.

http://ophilipp.free.fr/soft/mtail.zip

- Morten

Michelle Weber wrote:
> I just upgraded to log4net 1.2.10 from 1.2.9 (to fix that exception
> message I wrote about last week). And I'm having a big problem with
> the log files not rolling over at maximumFileSize and instead just
> overwriting itself!
>
> I have this running on a asp.net app on 2 different web servers
> (win2003/iis6). I had both files open with Tail for windows and this
> was not a problem in 1.2.9, the files would properly roll over. After
> I closed tail, one of the servers started properly rolling over files,
> the other still is not rolling over files. The one that is not rolling
> over files at the max file size did roll over the file based on the
> date last night, but this morning continues to overwrite itself when
> it reaches max file size.
>
> This is my configuration on both servers, and is unchanged from when I
> was using 1.2.9 without a problem:
>
>      <log4net debug="false">
>          <appender name="HttpTraceAppender"
> type="log4net.Appender.AspNetTraceAppender" >
>              <layout type="log4net.Layout.PatternLayout">
>                  <conversionPattern value="%date [%thread] %-5level 
> %logger
> [%ndc] - %message%newline" />
>              </layout>
>          </appender>
>          <appender name="RollingLogFileAppender"
> type="log4net.Appender.RollingFileAppender">
>              <file value="logs\serverip_log_" />
>              <rollingStyle value="Date" />
>              <appendToFile value="true" />
>             <rollingStyle value="Composite" />
>             <datePattern value="yyyyMMdd" />
>             <maxSizeRollBackups value="-1" />
>             <maximumFileSize value="20MB" />
>              <staticLogFileName value="false" />
>              <layout type="log4net.Layout.PatternLayout">
>                  <conversionPattern value="%date [%thread] %-5level 
> %logger
> [%ndc] - %message%newline" />
>              </layout>
>          </appender>
>          <root>
>              <level value="INFO" />
>              <appender-ref ref="RollingLogFileAppender" />
>              <appender-ref ref="HttpTraceAppender" />
>          </root>
>     </log4net>

Mime
View raw message