[prev in list] [next in list] [prev in thread] [next in thread] 

List:       log4net-user
Subject:    Number of rollbackfiles does not have the desired effect when the
From:       nati159 <nati159 () gmail ! com>
Date:       2009-05-11 14:19:45
Message-ID: 23484269.post () talk ! nabble ! com
[Download RAW message or body]


Hi,

I need to configure the settings so that the max number of files will be 10
and the max file size will be 100KB. 

Whenever I am not including the process id in my file name the machanism
works fine. The problem starts when I have many logs with different process
ids (closed by closing and opening the application). 

The "MaxSizeRollBackups" & "maximumFileSize" properties have an effect only
if the application stays open (i.e. for the same process id).

How can I make configure log4net to take into consideration all the log
files when rolling the file and not only the ones which belongs to the last
process id?

the relevant part from my config file is attached:

<appender name="FileAppender" type="log4net.Appender.RollingFileAppender">
		
        
        
        
        <maximumFileSize value="100KB" />
        
        
		<file type="log4net.Util.PatternString">
			<conversionPattern value="C:\log.ProcID_%processid.log" />
		</file>
		<threshold value="INFO"/>
		<layout type="log4net.Layout.PatternLayout">
			<conversionPattern value="%d [%t] %-5p [%c|%C.%M] - %m%n" />
		</layout>
</appender>

Thanks,
Natalie.
-- 
View this message in context: \
http://www.nabble.com/Number-of-rollbackfiles-does-not-have-the-desired-effect-when-the-file-name-inc-the-process-id-tp23484269p23484269.html
 Sent from the Log4net - Users mailing list archive at Nabble.com.


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic