logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pinto, Antonio Joaquim" <api...@indracpc.pt>
Subject RE: Log files thread release
Date Fri, 01 Oct 2004 13:58:49 GMT
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:Dag.Christensen@vbd.no] 
	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:apinto@indracpc.pt]
	Sent: Friday, October 01, 2004 3:44 PM
	To: log4net-user@logging.apache.org
	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.
	
	

Mime
View raw message