logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ceki Gülcü <c...@qos.ch>
Subject Re: Unexpected logger ancestor
Date Wed, 10 Dec 2003 13:37:26 GMT
At 01:32 PM 12/10/2003 +0000, tom ONeill wrote:
>Hi Ceki,
>
>I have been using log4j for a while now and I have read the documentation 
>on numerous occasions. I posted my question because the behaviour I 
>experienced was not consistent with what I had expected based on my 
>intepretation of the documentation (warrented that my interpretation may 
>not have been correct).
>
>The documentation states that
>"the name of a logger is a case sensitive string of dot seperated words 
>and each word in a logger name is said to be an ancestor of the subsequent 
>words and a parent of the immediately following word."
>
>"A logger is said to be an ancestor of another logger if its name followed 
>by a dot is a prefix of the descendant logger name. A logger is said to be 
>a parent of a child logger if there are no ancestors between itself and 
>the descendant logger. "
>
> From this I can take it that if I create a logger "X" and then create 
> another logger "X.Z" then the logger X is an ancestor of Z. If as I 
> outlined in my original question I create a logger "Y" and then a logger 
> "Y.Z" then the logger "Y.Z" is actually created as "X.Y.Z". I interpreted 
> the line "A logger is said to be an ancestor of another logger if its 
> name followed by a dot is a prefix of the descendant logger name"to mean 
> that the a logger can only be an ancestor of another logger if its name 
> follows by a dot is the immediate prefix of the decendant logger name. 
> Thus just because I had originally created a logger X.Z I would not 
> expected Y.Z to end up as "X.Y.Z" because "X" followed by a dot is not a 
> prefix of the logger name "Y.Z".
>
>However I can now see that by creating a logger "X" and a logger "X.Z" I 
>have said that "X" is an ancestor of "Z" and I suppose log4j holds this 
>relationship when I create the logger "Y.Z".

No, absolutely not.

X.Z and Y.Z should bear no relation to each other except their common 
ancestor the 'root' logger.

Does that answer your question?

>Tom

-- 
Ceki Gülcü

      For log4j documentation consider "The complete log4j manual"
      ISBN: 2970036908 http://www.qos.ch/shop/products/clm_t.jsp  



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


Mime
View raw message