Antonio, Which files are you unable to move? Are they the files with today's date? Yesterdays date? When you try to move yesterdays files is there a new logfile for today?
The RollingFileAppender will only roll the log file when a message is logged, e.g. if will roll the file when it receives the first message to log in a day. If no messages have been logged today then the appender will still have a lock on yesterday's log file. Nicko > -----Original Message----- > From: Pinto, Antonio Joaquim [mailto:[EMAIL PROTECTED] > Sent: 01 October 2004 14:59 > To: Log4NET User > Subject: RE: Log files thread release > > I�m using this one: > > <appender name="LogFileAppender" > type="log4net.Appender.RollingFileAppender"> > <file value="log.txt" /> > <appendToFile value="true" /> > <maximumFileSize value="1MB" /> > <maxSizeRollBackups value="-1" /> > <param name="RollingStyle" value="Composite" /> > <param name="StaticLogFileName" value="false" /> > <param name="CountDirection" value="1" /> > <param name="DatePattern" value=".yyyMMdd.\S\U\C" /> > <layout type="log4net.Layout.PatternLayout"> > <conversionPattern value="%-5p|%d|Thread:%-4t|%c %x|%m%n" /> > </layout> > </appender> > > I see some diferences, but where is the problem? The > maxSizeRollBackups? The RollingStyle? > > Thanks. > > > -----Mensagem original----- > De: Dag Christensen [mailto:[EMAIL PROTECTED] > Enviada: sex 01-10-2004 14:50 > Para: Log4NET User > Cc: > Assunto: RE: Log files thread release > > > > Do you use RollingFileAppender for your logging? I'm > using this setup which does not lock any of the "rolled" backup files. > > <appender name="LogFileAppender" > type="log4net.Appender.RollingFileAppender"> > <param name="File" value="log.txt" /> > <param name="CountDirection" value="1" /> > <param name="AppendToFile" value="true" /> > <param name="MaxSizeRollBackups" value="3" /> > <param name="MaximumFileSize" value="5MB" /> > <param name="RollingStyle" value="Size" /> > <param name="StaticLogFileName" value="true" /> > <layout type="log4net.Layout.PatternLayout"> > <param name="ConversionPattern" > value="%d{dd.MM.yy HH:mm:ss} [%t] %-5p %c [%x] %m%n" /> > </layout> > </appender> > > Dag > > ________________________________ > > From: Pinto, Antonio Joaquim [mailto:[EMAIL PROTECTED] > Sent: Friday, October 01, 2004 3:44 PM > To: [email protected] > Subject: Log files thread release > > > I�m using the latest version of log4net, with MS .NET > Window Aplication, that is always running. I need one time > every day to backup the log files from older days, but i > can�t do it, because all the files are being used by the > aplication ( System.IO.IOException - The process cannot > access the file because it is being used by another process. > ) when trying to move the old files to a backup directory. > How can i release the files that aren�t already being used? > > Thanks, > Antonio Pinto. > > > >
