1 Reply Latest reply on Nov 29, 2006 3:52 AM by Alex

    Automatically remove log-files

    Carsten Rudat Novice

      Hi All,

      is it possible to configure JBoss AS to remove log-files after a period of time? I use the DailyRollingFileAppender and I'd like to tell him to delete all logs after a month...

      Thanks for help.


        • 1. Re: Automatically remove log-files
          Alex Newbie


          I don't think JBoss has a feature for that. Instead you can use a RollingFileAppender like this:

           <appender name="LOGFILE" class="org.jboss.logging.appender.RollingFileAppender">
           <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
           <param name="File" value="D:/logs/jboss-EJB.log"/>
           <param name="Append" value="true"/>
           <param name="MaxFileSize" value="10000KB"/>
           <param name="MaxBackupIndex" value="100"/>
           <param name="Threshold" value="DEBUG"/>

          You need to figure out how much log output your server produces in a month.