logging-log4cxx-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fabijan...@nucorsteel.com
Subject Re: Can I have time stamp in log file name?
Date Mon, 21 Feb 2005 13:39:07 GMT
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.


"Ambarish Mitra" <ambarish_mitra@persistent.co.in> 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 
> example.log.<time> of creation, is there any way to accomplish this?
> -Ambarish.
> [attachment "winmail.dat" deleted by Aleksandar 
View raw message