If you change your configuration from <datePattern value="Error\s.yyyyMMdd.lo\g"/> to <datePattern value="error\s.yyyyMMdd.lo\g"/> does the overwriting still happen?
Regards, Chun Kit On Sat, Jun 2, 2012 at 12:19 AM, Pascal ROZE <pascal.r...@gmail.com> wrote: > Hello everyone > > I have a rolling file appender hosted in an IIS 6.0 application that looks > like: > > <appender name="RollingFileError" > type="log4net.Appender.RollingFileAppender"> > <file value="C:\Logfiles\"/> > <datePattern value="Error\s.yyyyMMdd.lo\g"/> > <threshold value="ALL"/> > <appendToFile value="true"/> > <rollingStyle value="Composite"/> > <maximumFileSize value="1MB"/> > <maxSizeRollBackups value="-1" /> > <countDirection value="1" /> > <staticLogFileName value="false"/> > <preserveLogFileNameExtension value="true"/> > <layout type="log4net.Layout.PatternLayout"> > <conversionPattern value="*%-10level %-30date %-25logger > %-15property{log4net:HostName} ThreadID: %-10thread %message %newline"/> > </layout> > </appender> > > So, at the end of the day, I have some files like Errors.20120601.0.log, > Errors.20120601.1.log, Errors.20120601.2.log and so on. > > But, if the application is restarted during the day, log file names restart > from 0 and the existing files are overwritten one after the other. > > How to avoid that? > > Thanx for your help > > Pascal >