Click or drag to resize
NestedDiagnosticsContext Class
Nested Diagnostics Context - a thread-local structure that keeps a stack of strings and provides methods to output them in layouts Mostly for compatibility with log4net.
Inheritance Hierarchy

Namespace: NLog
Assembly: NLog (in NLog.dll) Version: 4.3.0
public static class NestedDiagnosticsContext

The NestedDiagnosticsContext type exposes the following members.

Public propertyStatic memberTopMessage
Gets the top NDC message but doesn't remove it.
Public propertyStatic memberTopObject
Gets the top NDC object but doesn't remove it.
Public methodStatic memberClear
Clears current thread NDC stack.
Public methodStatic memberGetAllMessages
Gets all messages on the stack.
Public methodStatic memberGetAllMessages(IFormatProvider)
Gets all messages from the stack, without removing them.
Public methodStatic memberGetAllObjects
Gets all objects on the stack.
Public methodStatic memberPop
Pops the top message off the NDC stack.
Public methodStatic memberPop(IFormatProvider)
Pops the top message from the NDC stack.
Public methodStatic memberPopObject
Pops the top object off the NDC stack.
Public methodStatic memberPush(Object)
Pushes the specified object on current thread NDC.
Public methodStatic memberPush(String)
Pushes the specified text on current thread NDC.
See Also