log4net SDK Reference

MDC Class

Implementation of Mapped Diagnostic Contexts.

For a list of all members of this type, see MDC Members.

System.Object
   log4net.MDC

[Visual Basic]
NotInheritable Public Class MDC
[C#]
public sealed class MDC

Thread Safety

This type is safe for multithreaded operations.

Remarks

Note   

The MDC is deprecated and has been replaced by the Properties. The current MDC implementation forwards to the ThreadContext.Properties.

The MDC class is similar to the NDC class except that it is based on a map instead of a stack. It provides mapped diagnostic contexts. A Mapped Diagnostic Context, or MDC in short, is an instrument for distinguishing interleaved log output from different sources. Log output is typically interleaved when a server handles multiple clients near-simultaneously.

The MDC is managed on a per thread basis.

Requirements

Namespace: log4net

Assembly: log4net (in log4net.dll)

See Also

MDC Members | log4net Namespace