1 Reply Latest reply on Apr 1, 2014 4:36 AM by caro82

    Jboss 6.1.0 AS: Is there a way to rotate console log daily?

    caro82

      I'm using Jboss 6.1.0 AS with the following console logging configuration:

       

      <console-handler name="CONSOLE" autoflush="true" target="System.out">

              <error-manager><only-once/></error-manager>

             <level name="INFO"/>

             <formatter><pattern-formatter pattern="%d{yyyy-MM-dd HH:mm:ss,SSS} %-5p [%c] %s%E%n"/></formatter>

      </console-handler>

       

      Is there a way to achieve a daily rotation of the console log?

        • 1. Re: Jboss 6.1.0 AS: Is there a way to rotate console log daily?
          caro82

          I  achieved this, by replacing the above configuration with

           

          <periodic-rotating-file-handler

                       file-name="${jboss.server.log.dir}/jboss.log"

                       name="CONSOLE"

                       autoflush="true"

                       append="true"

                       suffix=".yyyy-MM-dd"> 

           

                   <error-manager>

                       <only-once/>

                   </error-manager>

                     <level name="INFO"/>

                   <formatter>

                       <!-- To revert back to simple stack traces without JAR versions, change "%E" to "%e" below. -->

                       <!-- Uncomment this to get the class name in the log as well as the category

                                   <pattern-formatter pattern="%d %-5p [%c] %C{1} (%t) %s%E%n"/>

                                   -->

                       <!-- Uncomment this to log without the class name in the log -->

                       <pattern-formatter pattern="%d{yyyy-MM-dd HH:mm:ss,SSS} %-5p [%c] %s%E%n"/>

                   </formatter>

               </periodic-rotating-file-handler>