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.
| 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. |
|
|
|
ActiveForums 3.7
|