Pushes a new context message into this stack.
Namespace: log4net.UtilAssembly: log4net (in log4net.dll) Version: 1.2.15.0 (1.2.15.0)
Syntax
Parameters
- message
- Type:
System String
The new context message.
Return Value
Type:
An

Remarks
Pushes a new context onto this stack. An IDisposable
is returned that can be used to clean up this stack. This
can be easily combined with the using keyword to scope the
context.
Examples
using(log4net.LogicalThreadContext.Stacks["NDC"].Push("Stack_Message")) { log.Warn("This should have an ThreadContext Stack message"); }
See Also