C# 클래스 NLog.MDC

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.
파일 보기 프로젝트 열기: NLog/NLog

공개 메소드들

메소드 설명
Clear ( ) : void

Clears the content of current thread MDC.

Contains ( string item ) : bool

Checks whether the specified item exists in current thread MDC.

Get ( string item ) : string

Gets the current thread MDC named item.

If the value isn't a string already, this call locks the LogFactory for reading the LoggingConfiguration.DefaultCultureInfo needed for converting to string.

GetObject ( string item ) : object

Gets the current thread MDC named item.

Remove ( string item ) : void

Removes the specified item from current thread MDC.

Set ( string item, string value ) : void

Sets the current thread MDC item to the specified value.

메소드 상세

Clear() 공개 정적인 메소드

Clears the content of current thread MDC.
public static Clear ( ) : void
리턴 void

Contains() 공개 정적인 메소드

Checks whether the specified item exists in current thread MDC.
public static Contains ( string item ) : bool
item string Item name.
리턴 bool

Get() 공개 정적인 메소드

Gets the current thread MDC named item.
If the value isn't a string already, this call locks the LogFactory for reading the LoggingConfiguration.DefaultCultureInfo needed for converting to string.
public static Get ( string item ) : string
item string Item name.
리턴 string

GetObject() 공개 정적인 메소드

Gets the current thread MDC named item.
public static GetObject ( string item ) : object
item string Item name.
리턴 object

Remove() 공개 정적인 메소드

Removes the specified item from current thread MDC.
public static Remove ( string item ) : void
item string Item name.
리턴 void

Set() 공개 정적인 메소드

Sets the current thread MDC item to the specified value.
public static Set ( string item, string value ) : void
item string Item name.
value string Item value.
리턴 void