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 Ne...@state.sd.us on 2004/10/27 15:10:39 UTC

RollingFileAppender question

I have the following configuration for a RollingFileAppender, but it's not
working as (I) expected:

<appender name="RollingFileAppender"
type="log4net.Appender.RollingFileAppender">
	<file value="cdtimer.log" />
	<appendToFile value="true" />
	<rollingStyle value="Date" />
	<countDirection value="1" />
	<maxSizeRollBackups value="-1" />
	<datePattern value="YYYY.MM.DD" />
	<layout type="log4net.Layout.PatternLayout">
		<param name="ConversionPattern" value="%n%d [%t] %-5p %c -
%m" />
	</layout>
</appender>

What I want is to have the log file roll over at midnight (and never
deleting a file automatically), creating a file called
"cdtimer.log.2004.10.25", with "cdtimer.log" being the most current file.

At the moment it appears that the file is not being rolled over at all. Can
anyone point out the error of my ways?

Thanks!

--
Neils Christoffersen