Click or drag to resize

MappedDiagnosticsContext Class

Note: This API is now obsolete.

Obsolete and replaced by ScopeContext with NLog v5. Mapped Diagnostics Context (MDC) is a dictionary of keys and values. Stores the dictionary in the thread-local static variable, and provides methods to output dictionary values in layouts.
Inheritance Hierarchy
SystemObject
  NLogMappedDiagnosticsContext

Namespace:  NLog
Assembly:  NLog (in NLog.dll) Version: 5.3.1+cf6675da40ccfd4c8c526a3b2bdbeed3442910a1
Syntax
[ObsoleteAttribute("Replaced by ScopeContext.PushProperty or Logger.PushScopeProperty using ${scopeproperty}. Marked obsolete on NLog 5.0")]
public static class MappedDiagnosticsContext

The MappedDiagnosticsContext type exposes the following members.

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