logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bart Berger <bber...@Brocade.COM>
Subject RollingFileAppender stops logging during rollover
Date Thu, 15 Dec 2011 00:36:01 GMT
Hi,

RollingFileAppender intermittently stops logging during rollover.  Anybody else seen this,
or know a workaround?

Here's the appender definition in log4j.xml:

   <appender name="MONITOR" class="org.jboss.logging.appender.RollingFileAppender">
    <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
    <param name="File" value="${dcm.home.dir}/logs/server/monitor.log"/>
    <param name="Append" value="true"/>
    <param name="MaxFileSize" value="10MB"/>
    <param name="MaxBackupIndex" value="5"/>
    <layout class="org.apache.log4j.PatternLayout">
      <param name="ConversionPattern" value="%d %-5p [%c] %m%n"/>
    </layout>
  </appender>

Occasionally, when monitor.log reaches 10MB it is successfully renamed and a new monitor.log
file is created.  But the new file remains empty, and no more logging occurs.

There are no other appenders defined that use the name monitor.log, and no other JVMs logging
to the same file.  There are no editors or other applications opening the log files (no 'tail'
running, for example).

We are using log4j version 1.2.16 running on Windows Server 2008 R2 (64-bit).  The application
runs under JBoss AS 5.1.0.  Just to be safe, I updated the log4j.jar in JBoss's folders to
version 1.2.16 also, but it didn't help.

Any suggestions on where to go from here?

Thanks much,
Bart Berger
bberger@brocade.com

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message