See if these articles help:
1) Section NDC/MDC at :
http://www.onjava.com/pub/a/onjava/2002/08/07/log4j.html?page=3
2) http://blog.f12.no/wp/2004/12/09/log4j-and-the-mapped-diagnostic-context
3) Code Sample at : http://www.rtner.de/software/MDCUserServletFilter.html
regards,
Hi,
currently i have been using log4j by declaring a logger per class. This
has worked well overall when developing and the granularity of debugging
it offers is useful.
However, I would like to introduce NDC into the mix and am not sure how
to do this.
Would i have to let go of the 'one l
> and also get a "null" for the first logging request, before
> having executed any NDC specific operations:
>
> 4 [0xb772e8e0] DEBUG org.apache.log4j.NDCTestCase null - message0
> 5 [0xb772e8e0] DEBUG org.apache.log4j.NDCTestCase (a) - message1
> 5 [0xb772e8e0] DEBUG org.apache.log4j.NDCTestCase n
Hi Munir,
note that log4cxx-user is the proper list for log4cxx related
questions :-)
I dont think that your issue is related to NDC
directly. I tried the following:
BasicConfigurator::configure();
logger->debug ("message0");
log4cxx::NDC::push ("(a)");
logger->debug ("message1");
log4cxx::NDC::
Hi,
I once used log4cxx-0.9.7 and the result of the following:
log4cxx::NDC::push ("(a)");
logger->debug ("message1");
log4cxx::NDC::pop ();
logger->debug ("message2");
was:
.. (a) message1
... message2
And now when I'm using the log4cxx-0.9.8 the result is:
.. (a) message1
.