logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From moonstone <acedog032...@yahoo.com>
Subject Re: AW: how to keep 3 days of logs
Date Tue, 18 Feb 2014 14:56:54 GMT
Thanks for your reply.  I was not clear in stating my goal.  The application
runs once per day.  With the log4net configuration that I have currently, I
get 1 log file each day with the date in the file name.  The number of log
files increases by one each day.  A user has to delete old log files by
sorting on the file date and deleting the oldest ones.  The customer only
wants to keep the log files from the last 3 runs of the application.  I can
write the code to delete the old files, but I thought I should check if
log4net can do it.

My configuration is shown below:
<appender name="RollingLogFileAppender"
	<datePattern value="'.'yyyy-MM-dd'.txt'" />
	<layout type="log4net.Layout.PatternLayout">

View this message in context: http://apache-logging.6191.n7.nabble.com/how-to-keep-3-days-of-logs-tp44594p44630.html
Sent from the Log4net - Users mailing list archive at Nabble.com.

View raw message