1 Reply Latest reply on Mar 4, 2006 11:19 AM by Scott Stark

    Log4j don't work fine in JBoss4.0.4RC1

    song hao Newbie

      Hi,all
      I find Log4j in JBoss4.0.4RC1 does not work fine.
      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>
      
      <root>
       <appender-ref ref="CONSOLE"/>
       <appender-ref ref="FILE"/>
       </root>


      but the filename is not "/log/server.log.yyyy-MM-dd-HH", it is "/log/server.log"