6 messages in org.apache.logging.log4j-userRE: Using log4j for writing a library...
FromSent OnAttachments
Marepalli, SomeshJun 3, 2004 2:32 pm 
Jacob KjomeJun 3, 2004 5:33 pm 
WJCarpenterJun 3, 2004 10:26 pm 
Marepalli, SomeshJun 4, 2004 6:05 am 
Marepalli, SomeshJun 4, 2004 6:11 am 
Jacob KjomeJun 4, 2004 5:05 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:RE: Using log4j for writing a library...Actions...
From:Jacob Kjome (ho@visi.com)
Date:Jun 4, 2004 5:05:15 pm
List:org.apache.logging.log4j-user

At 09:06 AM 6/4/2004 -0400, you wrote:

From another user's e-mail, there is a thread talking about detecting if log4j is configured - is that advisable for a library?

Like I said previously, logging is not your concern, but your user's concern. I see little reason for needing to detect whether it is configured or not. As a user, even if it is configured once, you would want your own to take precedence. So who cares if it has been configured previously. However, if you insist on wanting to do this, the wiki has a way to detect if logging is configured (I see you found it in your second email). Log4j-1.3, I believe, has a more robust mechanism to detect this. You might want to try it.

But from your mail - I am now sure of one thing. If by mistake, log4j is configured a second time inside the library, the user's root logger and other loggers would lose the settings from configuring the first time.

Is this a correct conclusion?

Yep, but only within the current logger repository. If you haven't defined a repository selector, the only logger repository available will be the default one. If you use a separate logger repository to do configuration, then you won't stomp on anyone else's configuration.

Jake