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?


Thanks for your help Ceki....

So you are saying that my "Y.Z" logger should not be created as "X.Y.Z" just because I already have a logger "X.Z"?. Therefore what I am seeing is some kind of error and not the expected behaviour? If I know it is an error I can now go and try find what is causing the problem.

My configuration is pretty straightforward so I doubt thats the issue. However I am using my own logger implementation (it extends Logger) so maybe somthing in there is causing the problem. Perhaps I have overridden one of Loggers methods incorrectly......


From: Ceki Gülcü Reply-To: "Log4J Users List" To: "Log4J Users List" ,[EMAIL PROTECTED] Subject: Re: Unexpected logger ancestor Date: Wed, 10 Dec 2003 14:37:26 +0100

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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]


_________________________________________________________________
Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to