Some other comments below...

> I am wondering if someone could explain the pros and
> cons of NDC and MDC. I have gone through the archives
> of log4j-user. It seems like the general feeling was
> that MDC is better. I want to be able to track a
> user's session through the web site. So when I hit the
> jsp page, I would call MDC.put or NDC.push the session
> id. Anything called from the jsp page could be trace
> by the session id. My initial unscientific experience
> with NDC was that at times the stack seemed to retain
> items.

It is generally accepted that MDC is better than NDC.  NDC is less flexible
in how data is inserted and accessed (it being a stack).  Also, there are
some issues with the NDC not releasing memory resources without calling it's
remove() method now and again.

> On a related note concerning the usage of the pattern
> %X{clientNumber}for MDC seems like it would be nice if
>  %X without a clientNumber would print out the entire
> Hashtable. This would allow the person debugging an
> application that did not have access to the
> documentation or source code an easy way to find out
> what all of the current context were at that point.
> They then could possibly refine the pattern they would
> use.

That is a useful suggestion, please enter it as part of your bug or as a
different "feature request" bug.

-Mark

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to