简体   繁体   中英

jBoss eap 5.1 run.log size too big

I'm having a lot issues qith my server jboss. The file size run.log increase to 4GB and the server stops.

I've tried setting the code below on jboss-log4j.xml, but it's not working.

<appender name="FILE" class="org.jboss.logging.appender.DailyRollingFileAppender">
  <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
  <param name="File" value="${jboss.server.log.dir}/run.log"/>
  <param name="Append" value="true"/>
  <param name="MaxFileSize" value="10000KB"/>
 <param name="MaxBackupIndex" value="5"/>

  <!-- Rollover at midnight each day -->
  <param name="DatePattern" value="'.'yyyy-MM-dd"/>

  <!-- Rollover at the top of each hour
  <param name="DatePattern" value="'.'yyyy-MM-dd-HH"/>
  -->

  <layout class="org.apache.log4j.PatternLayout">
     <!-- The default pattern: Date Priority [Category] (Thread) Message\n -->
     <param name="ConversionPattern" value="%d %-5p [%c] (%t) %m%n"/>

     <!-- The full pattern: Date MS Priority [Category] (Thread:NDC) Message\n
     <param name="ConversionPattern" value="%d %-5r %-5p [%c] (%t:%x) %m%n"/>
      -->
  </layout>

What more can I do?

The DailyRollingFileAppender is rolling over at a chosen frequency. Use the RollingFileAppender to make use of the max file size and backup index. Mixing is not possible, since both extend FileAppender .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM