0 Replies Latest reply on Oct 22, 2012 3:50 PM by envinyater

    Tried everything to get my log4j.xml file in my Maven Web Project to take over in JBoss 5.1

    envinyater Newbie

      I created a log4j.xml and I inserted it into ../WEB-INF/classes/ Here is the properties file

      <?xml version="1.0" encoding="UTF-8" ?>
      <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">

      <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">

      <appender name="console" class="org.apache.log4j.ConsoleAppender">
      <param name="Threshold" value="INFO" />
      <layout class="org.apache.log4j.PatternLayout">
      <param name="ConversionPattern" value="%-5p %c{1} - %m%n" />

      <appender name="fileAppender" class="org.apache.log4j.FileAppender">
      <param name="Threshold" value="INFO" />
      <param name="file" value="program.log" />
      <param name="append" value="true"/>
      <layout class="org.apache.log4j.PatternLayout">
      <param name="ConversionPattern" value="%-5p %c{1} - %m%n" />

      <logger name="com.program">
      <level value="debug" />
      <appender-ref ref="console"/>
      <appender-ref reg="fileAppender" />


      I have a simple LOG statement in a class that runs at startup. I am seeing that in the console -- so that LOG statement is working fine.

      JBoss 5.1 internal Log4j seems to be taking precedence and nothing I've found online is fixing it.

      Any suggestions I could try and report back or any additional information I need to provide?

      Here is the directory structure:


      Maven pom.xml