You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by David Crisp <da...@yahoo.com> on 2008/07/31 22:23:13 UTC
Multiplicative Bonehosery
Hi,
I'm using a number of API's that each use Log4j somewhere internally.
I've noticed that they all seem to step on each other's logging configs.
I know for certain that I'm not the only person to be burned by this,
so I'm wondering what you folks normally do to avoid it. Any pointers would
be appreciated.
Thanks!
D.
--
View this message in context: http://www.nabble.com/Multiplicative-Bonehosery-tp18762775p18762775.html
Sent from the Log4j - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org
Re: Multiplicative Bonehosery
Posted by Thorbjørn Ravn Andersen <th...@gmail.com>.
David Crisp skrev den 31-07-2008 22:23:
> Hi,
> I'm using a number of API's that each use Log4j somewhere internally.
> I've noticed that they all seem to step on each other's logging configs.
> I know for certain that I'm not the only person to be burned by this,
> so I'm wondering what you folks normally do to avoid it. Any pointers would
> be appreciated.
>
Could you elaborate on your scenario?
I understand that you have several pieces that use log4j independently
of one another. Why can you not just have a global log4j.properties
file which merge them in a single file?
If you really need several independent log4j instances in the same
program you must load them in seperate class loaders (most likely also
explicitly load from a configuration file NOT named
log4j.xml/log4j.properties). See in LogManager.java how the loading is
done.
--
Thorbjørn
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org