1 Reply Latest reply on Sep 29, 2010 12:28 PM by Peter Johnson

    Forcing server.log rotation

    acc01 Newbie



      We have set out appender  in log4j to:

      [CODE]<!-- A time/date based rolling appender -->
         <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="true"/>
           <!-- Rollover at midnight each day -->
           <param name="DatePattern" value="'.'yyyy-MM-dd"/>    
           <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"/>




      How can we force server.log to be rotated during the day incase the logs reach a large size or for any other reason? We are using JBoss AS4. I have tried setting the append value to false and going through jmx-xonsole to invoke reconfigure() but dont see any results. Is there another way of forcing log rotation?