This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Other Open Source Projects and the fly likes log4j : NDC Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "log4j : NDC" Watch "log4j : NDC" New topic

log4j : NDC

Mehul Mistry
Ranch Hand

Joined: Feb 10, 2006
Posts: 43
I working with one of the application developed in java and using log4j for logging. It has also been configured for chainsaw tool of Apache. When examining logs for through chainsaw, I noticed that there is a column called as NDC (nested diagnostic contexts). This is printing some text while at some events (Which I am not able to figure out, what kind of event). Also I noticed that when some text is printed in NDC the category for log is "Transactions".
I want to know under what condition this log will be printed and how and from where log4j picks up the string for NDC and prints it on the logs.

Can someone please help put some light on this.

[ August 08, 2008: Message edited by: Mehul Mistry ]
Paul Clapham

Joined: Oct 14, 2005
Posts: 18541

It's right there in the log4j manual. Scan for "NDC".
Mehul Mistry
Ranch Hand

Joined: Feb 10, 2006
Posts: 43
I never used NDC before so was not aware of it.In my initial investigations I could not reach there.Anyway, saw the manual, and traced the location where some text is pushed in NDC. Thank you.

subject: log4j : NDC
Similar Threads
JVM Log File Aggregator
Cannot find NullPointerException
Log4j Viewer
Log program name in Log4j?