ThreadContextStackClear Method Apache log4net™ SDK Documentation
Clears all the contextual information held in this stack.

Namespace: log4net.Util
Assembly: log4net (in log4net.dll) Version: 2.0.8.0-.NET 4.0
Syntax

public void Clear()
Remarks

Clears all the contextual information held in this stack. Only call this if you think that this tread is being reused after a previous call execution which may not have completed correctly. You do not need to use this method if you always guarantee to call the Dispose method of the IDisposable returned from Push(String) even in exceptional circumstances, for example by using the using(log4net.ThreadContext.Stacks["NDC"].Push("Stack_Message")) syntax.

See Also

Reference