logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christophe Marcourt" <christophe.marco...@mondeca.com>
Subject Question of inheritance
Date Mon, 18 Nov 2002 10:54:52 GMT
Hi,

Suppose I have a logger called foo with a OFF level, and another logger
called foo.bar with a DEBUG level, the definition in XML file will be :

    <logger name="foo">
        <level value="OFF"></level>
        <appender-ref ref="stdout"/>
    </logger>
    <logger name="foo.bar">
        <level value="DEBUG"></level>
        <appender-ref ref="file"/>
    </logger>

Am I right ? I think so.
Now how works the inheritance ?

If in my java code I invoke the info method on my logger foo.bar :
Logger logger = Logger.getLogger(“foo.bar”);
Logger.info(“a sample”);

I normally have a trace in my file (see : <appender-ref ref="file"/>) but I
also have a trace on my console (see : <appender-ref ref="stdout"/>).
Why ?
I thought that as info > debug so I trace in my foo.bar logger but info <
off so I should not have a trace.

Ideas ?


Christophe Marcourt
Mondeca
Ingénieur R&D
3, Cité Nollez. 75018 Paris
Phone : +33 1 44 92 35 03
Mobile : +33 6 14 48 65 66
Fax : +33 1 44 92 02 59
http://www.mondeca.com/fr
ICQ : #119811844


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message