logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Harkishin Nachnani <hnachn...@microaut.com>
Subject Log4J : Rolling File Appender Max File Size
Date Fri, 09 Feb 2001 21:11:32 GMT
Hi all
I want to set up a maximum file size of 10 KB and back up 3 copies of the
log. But for some reason, it doesn't work. Please help.
Following is my lcf file

log4j.rootCategory=DEBUG, file, console

#FILE
log4j.appender.file=org.apache.log4j.RollingFileAppender
log4j.appender.file.File=AgentWorkstation.log
# Append to file if it aleady exists.
log4j.appender.file.Append=true
log4j.appender.A1.MaxFileSize=10KB
#keep 3 back up files
log4j.appender.A2.MaxBackupIndex=3
#Output Pattern
log4j.appender.file.layout=org.apache.log4j.PatternLayout
log4j.appender.file.layout.ConversionPattern=%d{dd MMM yyyy HH:mm:ss,SSS}
%-5p (%C{1}:%L) - %m\n

#DOS PROMPT
log4j.appender.console=org.apache.log4j.FileAppender
log4j.appender.console.File=System.out
log4j.appender.console.layout=org.apache.log4j.PatternLayout
log4j.appender.console.layout.ConversionPattern=%d{dd MMM yyyy HH:mm:ss,SSS}
%-5p (%C{1}:%L) - %m\n

Mime
View raw message