logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lisa <l...@purpleblade.net>
Subject Re: Use category to limit by package name possible?
Date Wed, 17 Jan 2007 02:13:45 GMT

James Stauffer <stauffer.james <at> gmail.com> writes:

> 1. <category> -> <logger>
> 2. Remove class attribute from category/logger.
> 3. Define a <root> node at the bottom.

Thanks!  but I still have a few problems.  #3 <root> node was not required.  The
appender stayed the same.  the category (changed to logger) now looks like this:
(note priority is no longer an acceptable tag - changed to level)

    <!-- myfaces-impl -->
        <level value="debug"/>
        <appender-ref ref="JSF.INFO.LOG"/>

But now I want a debug log file with debug messages and above and an info file
with info and above on the same package.  It appears to me that the
name="<package>" is the limiting param but also functions as an id for the
<logger> tag so log4j is complaining. 

    <!-- presence-tech (debug) -->
        <level value="debug"/>
        <appender-ref ref="PT.DEBUG.LOG"/>

    <!-- presence-tech (info) -->
        <level value="info"/>
        <appender-ref ref="PT.INFO.LOG"/>

How do I create two loggers that limit to com.presence (one logger for 
debug and one for info)?

Log4J startup gives the following error message:
  log4j:WARN Attribute value "com.presence" of type ID must be unique within 
the document.

So how do you have two loggers that limit to the same package but different
levels (debug,info)?



To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org

View raw message