I'm using log4j 1.2.7jar and Tomcat 4.0.6 on windows2K.
I can not seem to successfully get the RollingFileAppender to back up
the file after it gets to a certain size. I saw this post in the
archives but it didn't seem to provide a solution:
http://www.mail-archive.com/log4j-user@jakarta.apache.org/msg06397.html

My properties file looks like:

log4j.rootCategory=ERROR, rolling
log4j.logger.com.adp=DEBUG
log4j.logger.corporate=DEBUG

log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%5p [%t] (%F:%L) - %m%n
 
log4j.appender.rolling=org.apache.log4j.RollingFileAppender
log4j.appender.rolling.File=C:\\jakarta-tomcat-4.0.6\\logs\\backoffice.log
log4j.appender.rolling.MaxFileSize=2KB
log4j.appender.rolling.MaxBackupIndex=5
log4j.appender.rolling.Append=true
log4j.appender.rolling.layout=org.apache.log4j.PatternLayout
log4j.appender.rolling.layout.ConversionPattern=%d{MM/dd/yy hh:mm:ss a } %-5p %c - %m%n

I'm using 2KB for max backup size for testing, but it never seems to
create a backup. It does end up creating a new backoffice.log when it gets
too big so that's good at least. However, I really need to create some
backups otherwise it's possible the last log message could reset the
log and you won't have a history of what other messages occurred.

Any help would be greatly appreciated with this.

Thanks,

-- 

Rick
mailto:[EMAIL PROTECTED]


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to