16 Jul 15:26
Logging NDC value
From: Duseja, Sushil <Sushil.Duseja <at> fiserv.co.in>
Subject: Logging NDC value
Newsgroups: gmane.comp.jakarta.log4j.user
Date: 2008-07-16 13:29:35 GMT
Subject: Logging NDC value
Newsgroups: gmane.comp.jakarta.log4j.user
Date: 2008-07-16 13:29:35 GMT
Hello, I used event.getNDC() to log the NDC value (where event is a org.apache.log4j.spi.LoggingEvent object), but it's fetching - 'null'. Similarly, I used event.getThrowableStrRep() to log the exception value but that is again fetching a null. Can anyone let me know the correct way of doing the same? Moreover, please let me know - how to log the MDC value? Note - I did set the parameter - locationInfo in the log4j.xml. Thanks.
RSS Feed