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 vjinaz <va...@hotmail.com> on 2010/09/07 19:28:02 UTC

help with RollingFileAppender

Hi,

I am having the following properties in my log4j.properties file:
log4j.appender.fai=org.apache.log4j.RollingFileAppender
log4j.appender.fai.file=/tmp/vj.log
log4j.appender.fai.append=true
log4j.appender.fai.layout=org.apache.log4j.PatternLayout
log4j.appender.fai.layout.ConversionPattern=%x %p %d{ISO8601} - %m%n
log4j.appender.fai.MaxFileSize=50MB
log4j.appender.fai.MaxBackupIndex=10

Whenever the log file reaches 50MB, it gets rolled over to another log file.
I dont want this behavior. What I want is that the new incoming logs should
overwrite the existing logs in the same file when the size exceeds 50MB. I
saw in another forum that we can remove the MaxBackupIndex property so that
additional backup files will not be created, but will that also solve the
other requirement of overwriting the old logs with the new incoming logs?

thanks
-- 
View this message in context: http://old.nabble.com/help-with-RollingFileAppender-tp29641608p29641608.html
Sent from the Log4j - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org