1 Reply Latest reply on Jun 14, 2005 9:37 AM by Luca Stancapiano

    log rotation - jboss.log

    Umar Sear Newbie

      I hope someone can help!

      I manage a server that is using jboss as part of it's setup. I am very very new to jboss and know very little about it. The problem I have is that on the server there is a jboss.log file that keeps on filling up and eating up all the disk space.

      I would like to manage these logs, using some thing like logrotate however can't seem to find any information on how to do this. If I simply rotate the log file, the jboss server just stop writing to the log file.

      Help will be greatly appreciated.

        • 1. Re: log rotation - jboss.log
          Luca Stancapiano Expert

          hi....you must to use this configuration in your $JBOSS_HOME/server/$SERVER_HOME/conf/log4j.xml



          <appender name="FILE" class="org.jboss.logging.appender.DailyRollingFileAppender">
           <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
           <param name="File" value="${jboss.server.home.dir}/log/server.log"/>
           <param name="Append" value="false"/>
          
           <!-- 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] Message\n -->
           <param name="ConversionPattern" value="%d %-5p [%c] %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>
           </appender>



          it is used by default in jboss 4.0.x