log4net may not have permission to move the old file. If you enable log4net internal debugging you should see any errors from log4net:
http://logging.apache.org/log4net/release/faq.html#internalDebug Cheers, Nicko > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] > Sent: 10 February 2006 10:14 > To: [email protected] > Subject: 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. > > -------------------------------------------------------------- > ---------- > >
