3 Replies Latest reply on Feb 21, 2012 11:36 AM by raj raj

    Append imestamp to log file name for size based RollingFileAppender.

    raj raj Newbie

      JBoss Server version: 5.1.


      I can not use daily or time based rotation based on our logging requirements.

      I am using size based rotation and I would like to have timestamp appended to the file name.


      My configuration:


        <!-- A size based file rolling 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="true"/>

              <param name="MaxFileSize" value="100MB"/>

              <param name="MaxBackupIndex" value="50"/>

                  <layout class="org.apache.log4j.PatternLayout">

                  <param name="ConversionPattern" value="%d{dd/MM/yy HH:mm:ss:SSS}|%t|%c|%5p|%m%n" />





      => It rotates file based on 100 MB with names server.log.1, server.log.2......


      I expect something similar to server.log.02122012.1


      Please let me know. Thanks for the help.