0 Replies Latest reply on Sep 21, 2010 5:45 AM by acc01

    jboss-log4j set specific time for rolling appender

    acc01

      Hi,

       

      I am  using the below rolling appender to roll our server logs. Howver we need this done at 7am instead of midnight. Is this possible?

       

      Thanks,

       

      Hemal

       

      <!-- 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"/>
              -->
            </layout>
          </appender>