1.2.9.0. It also worked in previous versions; I've been using the
RollingFileAppender for the last year without issue on both client and
server codebases.
Every one of my last 10 logs have rolled over at 1,024KB give or take 1 or
2KB depending on how things get flushed out.
05/04/2006 05:07 PM 531,239 trace-currrentuser.log
05/03/2006 04:38 PM 1,050,099 trace-currrentuser.log.18
05/03/2006 05:24 PM 1,049,977 trace-currrentuser.log.19
05/04/2006 10:01 AM 1,049,383 trace-currrentuser.log.20
05/04/2006 10:49 AM 1,050,536 trace-currrentuser.log.21
05/04/2006 11:19 AM 1,048,918 trace-currrentuser.log.22
05/04/2006 11:54 AM 1,051,031 trace-currrentuser.log.23
05/04/2006 02:17 PM 1,050,096 trace-currrentuser.log.24
05/04/2006 02:48 PM 1,049,638 trace-currrentuser.log.25
05/04/2006 02:58 PM 1,049,669 trace-currrentuser.log.26
05/04/2006 03:22 PM 1,049,788 trace-currrentuser.log.27
13 File(s) 11,030,374 bytes
----- Original Message -----
From: "Piwoni, Andre" <[EMAIL PROTECTED]>
To: "Log4NET User" <[email protected]>
Sent: Thursday, May 04, 2006 5:19 PM
Subject: RE: Rolling doesn't work based on size
I tried your configuration but it doesn't roll at specified size. It
rolls approximately at maximumFileSize * 8. Which version of log4net do
you use?
There has been some work on RollingFileAppender according to release
notes.
I use log4net v 1.2.9.0
Andre
-----Original Message-----
From: Hollywood [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 04, 2006 4:01 PM
To: Log4NET User
Subject: Re: Rolling doesn't work based on size
Here's my rolling log file appender configuration. And yes, it does
roll at
1024kb.
<appender name="RollingLogFileAppender"
type="log4net.Appender.RollingFileAppender">
<param name="File" value="logs\\trace-${log4net.username}.log"/>
<param name="AppendToFile" value="true"/>
<param name="MaxSizeRollBackups" value="10"/>
<param name="MaximumFileSize" value="1MB"/>
<param name="RollingStyle" value="Size"/>
<param name="StaticLogFileName" value="true"/>
<param name="CountDirection" value="1"/>
<layout type="log4net.Layout.PatternLayout,log4net">
<param name="Header" value="[Log Header]\r\n"/>
<param name="Footer" value="[Log Footer]\r\n"/>
<param name="ConversionPattern" value="%d %-5p %c.%m%n"/>
</layout>
<filter type="log4net.Filter.LevelRangeFilter">
<levelMin value="DEBUG" />
<levelMax value="INFO" />
</filter>
</appender>
----- Original Message -----
From: "Piwoni, Andre" <[EMAIL PROTECTED]>
To: "Log4NET User" <[email protected]>
Sent: Thursday, May 04, 2006 3:55 PM
Subject: RE: Rolling doesn't work based on size
Actually, RollingLogFileAppender rolls file but not when maximumFileSize
has been reached. I noticed that no matter what value I specify for
maximumFileSize it rolls file when size reaches approximately
maximumFileSize * 8. This suggest some byte/bit conversion bug.
Andre
________________________________
From: Piwoni, Andre [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 04, 2006 11:36 AM
To: [email protected]
Subject: Rolling doesn't work based on size
RollingLogFileAppender doesn't roll file based on size. It is used
within windows service.
Here's part of my configuration file:
<appender name="RollingLogFileAppender"
type="log4net.Appender.RollingFileAppender">
<file value="${windir}\\ FaxService.log" />
<appendToFile value="true" />
<rollingStyle value="Size" />
<maxSizeRollBackups value="10" />
<maximumFileSize value="100KB" />
<staticLogFileName value="false" />
<layout type="log4net.Layout.PatternLayout">
<param name="ConversionPattern" value="%d [%t]
%-5p %c [%x] - %m%n" />
</layout>
</appender>
Does anyone have any idea why?
Andre
E-Mail messages may contain viruses, worms, or other malicious code. By
reading the message and opening any attachments, the recipient accepts
full responsibility for taking protective action against such code.
Sender is not liable for any loss or damage arising from this message.
The information in this e-mail is confidential and may be legally
privileged. It is intended solely for the addressee(s). Access to this
e-mail by anyone else is unauthorized.
E-Mail messages may contain viruses, worms, or other malicious code. By
reading the message and opening any attachments, the recipient accepts
full
responsibility for taking protective action against such code. Sender is
not
liable for any loss or damage arising from this message.
The information in this e-mail is confidential and may be legally
privileged. It is intended solely for the addressee(s). Access to this
e-mail by anyone else is unauthorized.
E-Mail messages may contain viruses, worms, or other malicious code. By
reading the message and opening any attachments, the recipient accepts full
responsibility for taking protective action against such code. Sender is not
liable for any loss or damage arising from this message.
The information in this e-mail is confidential and may be legally
privileged. It is intended solely for the addressee(s). Access to this
e-mail by anyone else is unauthorized.