Click or drag to resize
MappedDiagnosticsContext Class
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.
Inheritance Hierarchy
SystemObject
  NLogMappedDiagnosticsContext

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

The MappedDiagnosticsContext type exposes the following members.

Methods
  NameDescription
Public methodStatic memberClear
Clears the content of current thread MDC.
Public methodStatic memberContains
Checks whether the specified item exists in current thread MDC.
Public methodStatic memberGet(String)
Gets the current thread MDC named item, as String.
Public methodStatic memberGet(String, IFormatProvider)
Gets the current thread MDC named item, as String.
Public methodStatic memberGetObject
Gets the current thread MDC named item, as Object.
Public methodStatic memberRemove
Removes the specified item from current thread MDC.
Public methodStatic memberSet(String, Object)
Sets the current thread MDC item to the specified value.
Public methodStatic memberSet(String, String)
Sets the current thread MDC item to the specified value.
Top
See Also