NLog Logging Library

MDC Class

[This is preliminary documentation and subject to change.]

Mapped Diagnostics Context - a thread-local structure that keeps a dictionary of strings and provides methods to output them in layouts. Mostly for compatibility with log4net.

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

System.Object
   NLog.MDC

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

Thread Safety

This type is safe for multithreaded operations.

Requirements

Namespace: NLog

Assembly: NLog (in NLog.dll)

See Also

MDC Members | NLog Namespace