1 Reply Latest reply on Feb 11, 2014 2:25 AM by megha_07

    Periodic and size Based rotating File handler


      I know that jboss 7.1.1 comes with log handlers that roll over the logs based on Period (periodic-rotating-file-handler) and size (size-rotating-file-handler). What i want is a handler that rolls based on both. So for example within a single day I want the log files to roll over based on size and as soon as the day ends i want the log file to roll over as well.


      I see that jboss comes with logManager module version 1.2.2. However I also noticed that version 1.3.1 of the log Manager comes with exactly the appender I am looking for PeriodicSizeRotatingFileHandler. So I upgraded this module in jboss and configured a custom handler that rolled over daily and also based on size. However I noticed that the log statements dont seem to get logged correctly. The latest several log statements are never logged in the file although I see them in the console. it is not unitl something else is logged that i see the statements missing from earlier logged. Although the new latest logs are then missing.


                 <custom-handler name="FILE" class="org.jboss.logmanager.handlers.PeriodicSizeRotatingFileHandler" module="org.jboss.logmanager">
                          <pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n"/>
                          <property name="file" value="../standalone/log/archon-omni-dv/server.log"/>
                          <property name="rotateSize" value="50000"/>
                          <property name="maxBackupIndex" value="50"/>
                          <property name="append " value="true"/>
                          <property name="suffix" value=".yyyy-MM-dd"/>
                          <property name="autoflush" value="true"/>


      Anyone know of a way to accurately roll over based on both size and time on Jboss 7.1.1?