Monday, May 21, 2012
 
The best way to analyze your logs! Minimize
 Log4Net Mail archive   

The Log4Net mailing list is a great source of information about using log4Net, in this forum we collect all the messages in the log4net user list and some selected threads from the developer list.

Subject: Number of rollbackfiles does not have the desired effect when the file name inc the process id
Prev Next
You are not authorized to post a reply.

Author Messages
nati159

05/11/2009 4:19 PM  


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.

You are not authorized to post a reply.
Forums > Log4Net > Log4Net Mail archive > Number of rollbackfiles does not have the desired effect when the file name inc the process id



ActiveForums 3.7

 

 

 

 

 

 

 

 

Log4Net Dashboard

Log analysis and monitoring made easy!

Log4Net Dashboard is a log viewer that can read log statements from a variety of logging output targets.

You can download a free developer version.

  

Check it out!

On the demonstration site you can try it  with live data.demo.l4ndash.com - Try Log4Net Dashboard with live data

The mail archive is a copy of all the mail sent to the mail address: log4net-user@logging.apache.org, organized as a forum.

If you would like to participate in the mail list, send a mail to log4net-user-subscribe@logging.apache.org.

More information about the mailing list is available on: http://logging.apache.org/log4net/support.html

 

A complete topic list is available and can be viewed here (warning, it takes some time to load)

 

Copyright 2005-2008 by FaktNet AS Terms Of Use Privacy Statement