logging-log4cxx-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dale King" <dalewk...@gmail.com>
Subject Re: How to config log4cxx to delete the log files periodically
Date Sat, 13 Sep 2008 14:19:59 GMT
Log4Cxx does not have this capability. It only lets you specify a max number
of files when using the size based rolling policy. This is not an arbitrary
decision. There is no good way to accomplish what you want. How is log4cxx
supposed to know what files it can delete? Log4cxx maintains no history of
what files it has created in the past.

I suggest you create a daily job that deletes log files that are more than
31 days old based on creation date.

On Fri, Sep 12, 2008 at 2:45 AM, Jathy <xuehai.fan@yahoo.com> wrote:

>
> Anybody has any idea about the below question? Waiting online...
>
>
> Jathy wrote:
> >
> > Hi All,
> >
> > In my project, I need produce one log file per day and delete the log
> > files periodically so that at most 31 files are stored. I used
> > DailyRollingFileAppender, it helped me to reach my first goal easily. But
> > how to config it to delete the log files automatically? Thanks.
> >
> > Regard,
> > Jathy
> >
>
> --
> View this message in context:
> http://www.nabble.com/How-to-config-log4cxx-to-delete-the-log-files-periodically-tp19448819p19450427.html
> Sent from the Log4cxx - Users mailing list archive at Nabble.com.
>
>


-- 
Dale King

Mime
View raw message