You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4net-user@logging.apache.org by Ia...@barclayscapital.com on 2006/02/10 11:14:28 UTC

RollingFileAppender just overwrites the same file

Hi all,

Newbie question, I appreciate any advice.

Below is my log4net config, copied from
http://logging.apache.org/log4net/release/config-examples.html#rollingfi
leappender

It is restarting the file each day - but it's overwriting it.
I was expecting it to rename the old one to logfile-20060209 or
something.

log4net 1.2.9 beta, debug .net framework 1.1 build.

Cheers
Iain Shepherd


<log4net>

<appender name="RollingLogFileAppender"
type="log4net.Appender.RollingFileAppender">
	<file value="logfile" />
	<appendToFile value="true" />
	<rollingStyle value="Composite" />
	<datePattern value="yyyyMMdd" />
	<maxSizeRollBackups value="10" />
	<maximumFileSize value="1MB" />
	<layout type="log4net.Layout.PatternLayout">
		<conversionPattern value="%date [%thread] %-5level
%logger [%property{NDC}] - %message%newline" />
	</layout>
</appender>

<root>
	<level value="ALL"/>
	<appender-ref ref="RollingLogFileAppender"/>
</root>

</log4net>


------------------------------------------------------------------------
For more information about Barclays Capital, please
visit our web site at http://www.barcap.com.


Internet communications are not secure and therefore the Barclays 
Group does not accept legal responsibility for the contents of this 
message.  Although the Barclays Group operates anti-virus programmes, 
it does not accept responsibility for any damage whatsoever that is 
caused by viruses being passed.  Any views or opinions presented are 
solely those of the author and do not necessarily represent those of the 
Barclays Group.  Replies to this email may be monitored by the Barclays 
Group for operational or business reasons.

------------------------------------------------------------------------