2 Replies Latest reply on Mar 22, 2013 8:08 AM by Sueleyman Vurucu

    Extends from PeriodicRotatingFileHandler

    Sueleyman Vurucu Expert

      Hi guys,


      I want to extend the behaviour of PeriodicRotatingFileHandler. For that I create a jboss module and extends from PeriodicRotatingFileHandler and override only



        protected void preWrite(ExtLogRecord record){






      <custom-handler name="MyAppender" class="myg.handler.PeriodicRotatingFileHandlerExtended" module="my.libs">
                          <pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n"/>
                           <property name="relativeTo" value="${jboss.server.log.dir}/app"/>
                          <property name="file" value="Application.log"/>
                          <property name="suffix" value=".yyyy-MM-dd"/>
                          <property name="maxBackupDays" value="2" /> <!-- This is my needed feature -->
                          <property name="append" value="true"/>


      I can debug this handler. It semms so thats works fine but my logfile is everytime empty.  Did I miss something ??