1 Reply Latest reply on Oct 24, 2016 1:51 PM by James Perkins

    Wildfly 9 - log configuration

    Dominique Claes Newbie

      Is there a property that can be set to the handler 'periodic-rotating-file-handler' so that the server log isn't overwritten for that day when the server reboots?

      So I want multiple server logs from the same day every time the server reboots.

      Or does a future Wildfly release support such an option?


      My current configuration is the following:


      <periodic-rotating-file-handler name="FILE" autoflush="true">

           <level name="INFO"/>


                <named-formatter name="PATTERN"/>


           <file relative-to="jboss.server.log.dir" path="server.log"/>

           <suffix value=".yyyy-MM-dd"/>

           <append value="true"/>



      <formatter name="PATTERN">

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


        • 1. Re: Wildfly 9 - log configuration
          James Perkins Master

          You could use a periodic-size-rotating-file-handler which allows for rotation on boot. One thing to note is on WildFly 9 it seems to rotate the file twice during boot. This seems to be fixed in WildFly 10 however.


          /subsystem=logging/periodic-size-rotating-file-handler=test:add(rotate-on-boot=true, append=true, autoflush=true, max-backup-index=20, suffix=".yyyy-MM-dd", named-formatter=PATTERN, file={relative-to=jboss.server.log.dir, path="test.log"})



          James R. Perkins