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: Bug in log4net.Appender.BufferingForwardingAppender?
Date Thu, 18 Aug 2005 13:14:29 GMT
Chris,

This has been fixed in CVS and is tracked by issue:
http://issues.apache.org/jira/browse/LOG4NET-32 

Cheers,
Nicko

> -----Original Message-----
> From: Castrianni, Chris {PBSG} [mailto:Chris.Castrianni@pbsg.com] 
> Sent: 18 August 2005 13:55
> To: log4net-user@logging.apache.org
> Subject: Bug in log4net.Appender.BufferingForwardingAppender?
> 
> Using Log4Net 1.2 Beta 9 and with Lossy set to 'false', the 
> log4net.Appender.BufferingForwardingAppender appears to loose 
> messages.
> 
> Configuration
> ----------------------
> 
> <appender name="BufferedAppender"
> type="log4net.Appender.BufferingForwardingAppender">
>     <bufferSize value="4"/>
>     <lossy value="false"/>
>     <appender-ref ref="FileAppender" />
> </appender>
> <appender name="FileAppender" type="log4net.Appender.FileAppender">
>     <file value="log.txt" />
>     <appendToFile value="false" />
>     <layout type="log4net.Layout.PatternLayout">
>         <conversionPattern value="%date %-5level %logger - 
> %message%newline" />
>     </layout>
> </appender>
> 
> 
> Code
> ----------------------
> 
> for ( int i = 1; i <= 20; i++ )
> {
>     log.Debug( "This is message " + i ); }
> 
> 
> Output (log.txt)
> ----------------------
> 
> 2005-08-18 07:41:00,174 DEBUG Log4NetTest.Program - This is message 2
> 2005-08-18 07:41:00,174 DEBUG Log4NetTest.Program - This is message 3
> 2005-08-18 07:41:00,190 DEBUG Log4NetTest.Program - This is message 4
> 2005-08-18 07:41:00,190 DEBUG Log4NetTest.Program - This is message 5
> 2005-08-18 07:41:00,190 DEBUG Log4NetTest.Program - This is message 7
> 2005-08-18 07:41:00,190 DEBUG Log4NetTest.Program - This is message 8
> 2005-08-18 07:41:00,190 DEBUG Log4NetTest.Program - This is message 9
> 2005-08-18 07:41:00,190 DEBUG Log4NetTest.Program - This is message 10
> 2005-08-18 07:41:00,206 DEBUG Log4NetTest.Program - This is message 12
> 2005-08-18 07:41:00,206 DEBUG Log4NetTest.Program - This is message 13
> 2005-08-18 07:41:00,206 DEBUG Log4NetTest.Program - This is message 14
> 2005-08-18 07:41:00,206 DEBUG Log4NetTest.Program - This is message 15
> 2005-08-18 07:41:00,206 DEBUG Log4NetTest.Program - This is message 17
> 2005-08-18 07:41:00,206 DEBUG Log4NetTest.Program - This is message 18
> 2005-08-18 07:41:00,206 DEBUG Log4NetTest.Program - This is message 19
> 2005-08-18 07:41:00,206 DEBUG Log4NetTest.Program - This is message 20
> 
> 
> Note that messages 1, 6, 11, and 16 are missing (i.e. every
> BufferSize+1).  If I change BufferSize to 3, then messages 1, 
> 5, 9, 13,
> and 17 are missing.
> 
> Am I missing something?
> 
> Thanks,
> Chris
> 

Mime
View raw message