m.harig | 18 Jul 07:02

custom log4j DRFA file name


hi all

    how do i set log file name with timestamp . say for example
logfile_22_05_2008.log  is there any option for this? anyone help me out of
this
--

-- 
View this message in context: http://www.nabble.com/custom-log4j-DRFA-file-name-tp18522700p18522700.html
Sent from the Log4j - Users mailing list archive at Nabble.com.
Chris Pratt | 30 Jul 20:01

Re: custom log4j DRFA file name

Maybe

log4j.appender.T=org.apache.log4j.DailyRollingFileAppender
log4j.appender.T.File=${catalina.base}/logs/application.log
log4j.appender.T.DatePattern='.'yyyy-MM-dd'.log'
log4j.appender.T.layout=org.apache.log4j.PatternLayout
log4j.appender.T.layout.ConversionPattern=[%d{EE MMM d kk:mm:ss yyyy}]
[%-5p] [%t] %c - %m%n

or something similar in your log4j props?

You should check out:

http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/RollingFileAppender.html

m.harig wrote:
> hi all
>
>     how do i set log file name with timestamp . say for example
> logfile_22_05_2008.log  is there any option for this? anyone help me out of
> this
>   

Gmane