Possibly, except on our client side the number of days to keep could be
anything from 7 to 365.....
Sometimes these logs are only for general INFO+ logging, but at other
times it could be to troubleshoot problems that are random - hence we
need debug logs for an undetermined period of time.
I really need this build into log4cplus rather than an external process
because it could be used on a server or a user PC.
Out of interest, how are you generating those filenames ? Is the 'File'
option configurable ?
Mal
-----Original Message-----
From: Alexander Neundorf [mailto:neu...@kd...]
Sent: Wednesday, 29 June 2011 5:17 AM
Subject: Re: [Log4cplus-devel] Max. Age of DailyRollingFileAppender
> I need daily logs, but I need them to be automatically deleted after
> 31 days.
What I am doing is I create filenames for the logfiles so that they
contain the day of the week (e.g. MyLogFile-Monday.log), this way I
always have the log files from one week around.
Maybe this could also work for you ?
Alex
|