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 Fabrizio Squittieri <f....@comune.prato.it> on 2005/09/22 10:33:49 UTC

MDC and shared lib

Hi there,
i've got a wrapper which wrap log4j logger, and i put in it some
information as user and Ip.
 
Now we've got a lot of webapps and a shared connection pool which uses
this log wrapper.
The wrapper wraps all log calls to log4j and before to do this puts user
and Ip into the MDC.
 
The weird thing is that the shared connection pool puts a USER and IP
into the wrapper and then log (so USER and IP at the end ara into the
MDC),
and sometimes the webapps log their statements with these USER and IP
instead of their real user and address.
 
Is the MDC still valid for a jar which is into the shared/lib of tomcat
or setting MDC there is an error?
 
Thanks
 
Fabrizio Squittieri - Programmatore
 
Sistema informativo - Comune di Prato
Via Cairoli 16 - Prato
 
Tel. 3338338648
 
<ma...@comune.prato.it> 
fabrizio@squittieri.it