AFAICT, the closest to what you are looking for would be the DailyRolingFileAppender - it automatically renames old example.log to example.log.date format at midnight, when the new day file is created.

But, then there are few (significant) catches - there is no option to automatically delete old files (really a pain). Also, it has been deprecated in log4j (in favor of using strategy design pattern, I believe), so I guess it will go away in log4cxx as well.

Alex

"Ambarish Mitra" <[EMAIL PROTECTED]> wrote on 02/21/2005 08:07:49 AM:

> Hi,
>
> Can I have time stamp in log file name?
>
> To elaborate, if my entries in the property files are:
> ...
> log4j.appender.R=org.apache.log4j.RollingFileAppender
> log4j.appender.R.File=../logs/example.log
> ..
>
> Now, I want that instead of log file name: example.log, I want the name as
> example.log.<time> of creation, is there any way to accomplish this?
>
> -Ambarish.
>
>
> [attachment "winmail.dat" deleted by Aleksandar Fabijanic/Maintenance/NSB]

Reply via email to