Re: [Log4cplus-devel] DailyRollingFileAppender does not honor maxBackupIndex
Logging Framework for C++
Brought to you by:
wilx
From: Václav Z. <vha...@gm...> - 2012-02-27 21:03:00
|
2012/2/27 Deepak Muley <dee...@hd...> > Thank you for the information. > > Few queries: > 1. I am failing to understand when does it create a backup file in the > first place. I tested with schedule set to minutely, daily and weekly and > ran for long time but still did not see a single file getting created with > .1, .2 extension. What is the premise for creating these files. It always > creates with postfix with date (and its variations based on schedule) > Try the TWICE_DAILY schedule. I believe it works in that case. > > 2. If I use the DaillyRollingFileAppender is there a way to limit the > number of days the log files are kept. i.e. always keep the seven newest > logs or Do I have to use RollingFileAppender to achieve this. > This is not possible with the DaillyRollingFileAppender. It would have to keep information about previous logs and even then that information would be lost between restarts of your application. -- VZ |