-
1. Re: log4j Configuation
urddd Sep 1, 2003 9:28 AM (in response to degriffing)I'd like to know it because I have a similar problem.
-
2. Re: log4j Configuation
degriffing Dec 5, 2003 4:42 PM (in response to degriffing)I have reviewed other Log4j documention and still have not found a solution to my original problem. Does anyone have the answer?
-
3. Re: log4j Configuation
urddd Dec 6, 2003 5:08 AM (in response to degriffing)I think I've got only part of the solution:
My solution is not really elegant but it works on JBoss 3.2.2 (the log4j config file on JBoss 3.0.6 is slightly diffrent but I think the same pattern can be applied).
In one sentence, what I've done it to set the level into the appender and not into the category.
In the example below I've done several things:
- Remove root's appender-ref (they're commented)
- Create the category whith the appenders without setting a priority value
- Set a Threshold in the appenders.
The consequence is that you have several appenders writting to the same output (file or console).
In CONSOLE:
org.jboss.varia DEBUG
org.jboss.deployment INFO
In FILE:
org.jboss.varia INFO
org.jboss.deployment DEBUG
Working log4j.xml example on jboss 3.2.2:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
<!-- ============================== -->
<!-- Append messages to the files -->
<!-- ============================== -->
<param name="DatePattern" value="'.'yyyy-MM-dd"/>
<param name="DatePattern" value="'.'yyyy-MM-dd"/>
<!-- ============================== -->
<!-- Append messages to the console -->
<!-- ============================== -->
<!-- ================ -->
<!-- Limit categories -->
<!-- ================ -->
<appender-ref ref="FILE_INFO"/>
<appender-ref ref="CONSOLE_DEBUG"/>
<appender-ref ref="FILE_DEBUG"/>
<appender-ref ref="CONSOLE_INFO"/>
<!-- ======================= -->
<!-- Setup the Root category -->
<!-- ======================= -->
<!--
<appender-ref ref="CONSOLE"/>
<appender-ref ref="FILE"/>
-->
</log4j:configuration> -
4. Re: log4j Configuation
degriffing Dec 8, 2003 9:10 AM (in response to degriffing)Thanks for your update. I tried following the same pattern with the JBoss 3.0.6 log4j.xml. Unfortunately, it did not work. Still looking.