logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shrivastava, Ravi" <ravi.shrivast...@bankofamerica.com>
Subject RE: Using RollingFileAppender
Date Wed, 08 Dec 2004 15:34:03 GMT
I have tried that but it seems to either overwrite the logs
(appendtofile=false) if I run the app multiple times during the same day or
keeps appending to the file (appendtofile=true) even after 1 week has gone
by. Keep in mind I want to have a week worth of logs - come next Monday, for
ex, and I'd like to start a new Monday.log file.

-----Original Message-----
From: Andrew Elmhorst [mailto:nospam@elmhorst.com] 
Sent: Wednesday, December 08, 2004 9:14 AM
To: 'Log4NET User'
Subject: RE: Using RollingFileAppender

Try setting the DatePattern property on the RollingFileAppender to

This should create backup log files in the pattern [logfilename].Monday.log.
This should get you close to what you want. You can also set the
StaticLogFileName to false and the RollingFileAppender should write directly
to [logfilename].Monday.log.


Andrew Elmhorst

-----Original Message-----
From: Shrivastava, Ravi [mailto:ravi.shrivastava@bankofamerica.com] 
Sent: Wednesday, December 08, 2004 7:56 AM
To: 'Log4NET User'
Subject: Using RollingFileAppender

Is there a way I can configure RollingFileAppender to create a log file per
day, append to it if it's the app is run multiple times during that same
day, but overwrite it the following week. Ex: Have Monday.log,
Tuesday.log....etc., which show me logged activity for all of that day - on
the following Monday, Tues....they get overwritten.


View raw message