0 Replies Latest reply on Aug 24, 2015 9:32 AM by mohab elamry

    how to create JBOSS 7 Dynamic Log file with rotating file handler

    mohab elamry Newbie

      hi everyone,

      i am trying to configure JBOSS 7 to log in dynamic file name (dd-mm-yyyy.log) plus size rotating file handler. i mean i want the file to only grow up to 50 MB before adding index ( 1,2,3,4) then the next day the log file name should be new file name with dd-mm-yyyy and start again the index.

      example for output





      any help how to obtain that ? below is my configuration file

      <console-handler name="CONSOLE">
         <level name="INFO"/>
         <pattern-formatter pattern="%K{level}%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n"/>
         <size-rotating-file-handler name="FILE" autoflush="true">
         <pattern-formatter pattern="%z{utc}%d{dd/MM/yyyy HH:mm:ss,SSS} %-5p [%c] %s%E%n"/>
         <file relative-to="jboss.server.log.dir" path="${%d{HH-mm-ss-SSS}}.log"/>
         <rotate-size value="5K"/>
         <max-backup-index value="10"/>
         <append value="true"/>


      thanks for your support