You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Mufaddal Khumri <mu...@wmotion.com> on 2004/11/08 20:47:57 UTC

Controlling the filenames while using DailyRollingFileAppender

I have the following in my log4j.properties file:

# set the appender to be DailyRollingFileAppender
log4j.appender.A1=org.apache.log4j.DailyRollingFileAppender
log4j.appender.A1.file=${log.home}/cw_log.txt
# set file to be backed up beginning of every week.
log4j.appender.A1.DatePattern=.yyyy-ww

When my cw_log.txt file is backed up at the beginning of every week it 
names the backed up file like: cw_log.txt.2004-45

How can I tell Log4j to name the back up file - cw_log.2004-45.txt OR 
cw_log.txt.2004-45.txt ?

Regards