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. Ivan
