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 Dirk Wigger <dw...@ipicorp.com> on 2002/07/16 17:17:04 UTC

Daily rollover of log file

Hi,

I'm looking to roll over my log file on a daily basis (not based on file
size) and was wondering how this can be done.

I couldn't find any reference on that. Any help out there.

My log.cfg file is configured like that:

log4j.rootCategory=debug, R
log4j.category.Parser=warn

log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout

# Pattern to output the caller's file name and line number.
log4j.appender.stdout.layout.ConversionPattern=%5p [%t] (%c) - %m%n

log4j.appender.R=org.apache.log4j.RollingFileAppender
log4j.appender.R.File=/abc/logs/appl.log

log4j.appender.R.MaxFileSize=15MB
# Keep one backup file
log4j.appender.R.MaxBackupIndex=1

log4j.appender.R.layout=org.apache.log4j.PatternLayout
log4j.appender.R.layout.ConversionPattern=%d %5p [%t] %c - %m%n