title: Configuring Rolling File Appender
body: <p>My jboss application server log file named jboss-log4j.xml has the following configuration for the rolling file appender</p>
  
  <pre><code>&lt;appender name="FILE" class="org.jboss.logging.appender.RollingFileAppender"&gt;
   &lt;errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/&gt;
   &lt;param name="File" value="${jboss.server.log.dir}/server.log"/&gt;
   &lt;param name="Append" value="false"/&gt;
   &lt;param name="MaxFileSize" value="500KB"/&gt;
   &lt;param name="MaxBackupIndex" value="1"/&gt;
  
   &lt;layout class="org.apache.log4j.PatternLayout"&gt;
     &lt;param name="ConversionPattern" value="%d %-5p [%c] %m%n"/&gt;
   &lt;/layout&gt;      
  &lt;/appender&gt;
  </code></pre>
  
  <p>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</p>