On 1 Dec 2013, at 11:37, Ivan Habunek wrote:
On 1 December 2013 11:23, Christian Grobmeier <[email protected]>
wrote:
In Log4j2 we have not kept it because we lack of such a scenario. In
addition people
seem to be confused over NDC. Curious about your ideas here (also
useful for
docs, in case we keep it).
Consider a scenario where you have a layered application. Imagine your
request has to go through a series of layers (like a protocol stack,
for example). You can make each layer add an entry to the NDC. Then
when something is logged, you could know exactly where you are in the
stack, and what the components in the stack are. When leaving a layer,
you just pop() the entry you added on arrival.
Basically you could do that with MDC as well (pushing an object instead
of a primitive value).
But I see your point. Let's leave it in for now, I am going to work
through some docs.
Cheers
Ivan
---
http://www.grobmeier.de
@grobmeier
GPG: 0xA5CC90DB