0 Replies Latest reply on Jul 14, 2005 1:46 PM by merkkila

    Log4j configuration and class loaders

    merkkila Newbie

      I am having a problem getting the Log4j to output information from the struts (org.apache.struts) classes in my project (ear with war and har).

      I followed the instructions in the Wiki and got my program to use it's own log4j.xml config but only classes from my project (com.somecompany) are outputting to it.

      Not sure if this has to do with the class loader change I made or what but any advice would be greatly appreciated.

      ******** jboss-web.xml snippet **********

       <class-loading java2ClassLoadingCompliance="false">

      ******* log4j.xml **********

      <?xml version="1.0" encoding="UTF-8" ?>
      <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
      <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
       <appender name="FILE" class="org.apache.log4j.DailyRollingFileAppender">
       <param name="File" value="${jboss.server.home.dir}/log/ROOT.log"/>
       <param name="Append" value="false"/>
       <param name="DatePattern" value="'.'yyyy-MM-dd"/>
       <layout class="org.apache.log4j.PatternLayout">
       <param name="ConversionPattern" value="%d %-5p [%c] %m%n"/>
       <category value="org.apache.struts">
       <priority value="DEBUG"/>
       <priority value ="DEBUG"/>
       <appender-ref ref="FILE"/>