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"
type="log4net.Appender.RollingFileAppender">
<datePattern value="'.'yyyy-MM-dd'.txt'" />
<layout type="log4net.Layout.PatternLayout">
</layout>
</appender>
--
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.