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