0 Replies Latest reply on Oct 31, 2005 11:04 AM by Luigi Putanesca

    Disappearing log file...

    Luigi Putanesca Newbie

      I'm using JBoss 4.0.3 and this problem started and continued since I installed 4.0.3 RC2. Don't know if that was just a coincidence, but it seemed to work fine before that.

      What happens is that my application log file will unexpectedly be cleared and start over empty way before it reaches the maximum file size I specified. Additionally, the requested backup file is not made.

      I understand that when the server restarts, it will clear the log file however this happens when the server is running and I am in the middle of running unit tests. I have tried to determine the circumstances that trigger it but I can't. It seems kind of random.

      Below is an excerpt from my log4j.xml file. I know this is being applied as I can change things in this file and see the effects in the logging. Sometimes it actually does work and the file reaches the max size and then rolls into a backup file, however most of the time it disappears when I least expect it to.


      <appender name="LGS" class="org.jboss.logging.appender.RollingFileAppender">
       <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
       <param name="File" value="${jboss.server.home.dir}/log/lgs.log"/>
       <param name="Append" value="false"/>
       <param name="MaxFileSize" value="2048KB"/>
       <param name="MaxBackupIndex" value="5"/>
      
       <layout class="org.apache.log4j.PatternLayout">
       <!-- The full pattern: Date MS Priority [Category] (Thread:NDC) Message\n -->
       <!-- param name="ConversionPattern" value="%d %-5r %-5p [%c] (%t:%x) %m%n"/-->
       <param name="ConversionPattern" value="%d %-5r %-5p [%c] %m%n"/>
       </layout>
       </appender>