2 Replies Latest reply on Sep 17, 2010 12:50 PM by john gregory

    log4j configuration

    john gregory Newbie

      I'm trying to configure jboss 4.2.3 to work with log4j.


      I want my log stuff to go to a specific log file, so I've tried configuring it according

      to documentation @




      So far, in my conf/jboss-log4j.xml file, I've added the following:


      <appender name="SCWCD" class="org.apache.log4j.FileAppender">
            <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
            <param name="File" value="${jboss.server.log.dir}/scwcd.log"/>
            <param name="Append" value="false"/>
            <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"/>
            <filter class="org.jboss.logging.filter.TCLFilter">
               <param name="AcceptOnMatch" value="true"/>
               <param name="DeployURL" value="scwcd-exp.war"/>




      <appender-ref ref="SCWCD"></appender-ref>


      Also, I've added a category descriptor to limit logging.


      The problem is I'm getting a ClassLoader exception.  In looking into this, a common issue is not having a log4j.jar file bundled with

      your application.  However, I have it included with my war file...


      Hopefully, someone can help with this.