Configuring Rolling File Appender
Posted
by Anand
on Stack Overflow
See other posts from Stack Overflow
or by Anand
Published on 2010-04-01T11:33:43Z
Indexed on
2010/04/01
12:13 UTC
Read the original article
Hit count: 435
Hi,
My jboss application server log file named jboss-log4j.xml has the following configuration for the rolling file appender
<appender name="FILE" class="org.jboss.logging.appender.RollingFileAppender">
<errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
<param name="File" value="${jboss.server.log.dir}/server.log"/>
<param name="Append" value="false"/>
<param name="MaxFileSize" value="500KB"/>
<param name="MaxBackupIndex" value="1"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d %-5p [%c] %m%n"/>
</layout>
</appender>
What does this exactly do ? How should I set it to do either of the two things ? 1. Delete logs older than 5 days or 2. Delete logs when they exceed 800MB, so that once they are deleted the new logs can take effect
© Stack Overflow or respective owner