C# 클래스 NLog.LogManager

Creates and manages instances of T:NLog.Logger objects.
파일 보기 프로젝트 열기: NLog/NLog 1 사용 예제들

Private Properties

프로퍼티 타입 설명
AddHiddenAssembly void
CreateNullLogger Logger
GetClassFullName string
GetCurrentClassLogger Logger
GetCurrentClassLogger Logger
GetLogger Logger
GetLogger Logger
IsHiddenAssembly bool
LogManager System
LogManager_OnStopLogging void
SetupTerminationEvents void

공개 메소드들

메소드 설명
DisableLogging ( ) : IDisposable

Decreases the log enable counter and if it reaches -1 the logs are disabled.

Logging is enabled if the number of EnableLogging calls is greater than or equal to DisableLogging calls.

EnableLogging ( ) : void

Increases the log enable counter and if it reaches 0 the logs are disabled.

Logging is enabled if the number of EnableLogging calls is greater than or equal to DisableLogging calls.

Flush ( ) : void

Flush any pending log messages (in case of asynchronous targets) with the default timeout of 15 seconds.

Flush ( AsyncContinuation asyncContinuation ) : void

Flush any pending log messages (in case of asynchronous targets).

Flush ( AsyncContinuation asyncContinuation, System.TimeSpan timeout ) : void

Flush any pending log messages (in case of asynchronous targets).

Flush ( AsyncContinuation asyncContinuation, int timeoutMilliseconds ) : void

Flush any pending log messages (in case of asynchronous targets).

Flush ( System.TimeSpan timeout ) : void

Flush any pending log messages (in case of asynchronous targets).

Flush ( int timeoutMilliseconds ) : void

Flush any pending log messages (in case of asynchronous targets).

IsLoggingEnabled ( ) : bool

Checks if logging is currently enabled.

Logging is enabled if the number of EnableLogging calls is greater than or equal to DisableLogging calls.

ReconfigExistingLoggers ( ) : void

Loops through all loggers previously returned by GetLogger. and recalculates their target and filter list. Useful after modifying the configuration programmatically to ensure that all loggers have been properly configured.

Shutdown ( ) : void

Dispose all targets, and shutdown logging.

비공개 메소드들

메소드 설명
AddHiddenAssembly ( Assembly assembly ) : void
CreateNullLogger ( ) : Logger
GetClassFullName ( ) : string

Gets the fully qualified name of the class invoking the LogManager, including the namespace but not the assembly.

GetCurrentClassLogger ( ) : Logger
GetCurrentClassLogger ( Type loggerType ) : Logger
GetLogger ( string name ) : Logger
GetLogger ( string name, Type loggerType ) : Logger
IsHiddenAssembly ( Assembly assembly ) : bool
LogManager ( ) : System
LogManager_OnStopLogging ( object sender, EventArgs args ) : void
SetupTerminationEvents ( ) : void

메소드 상세

DisableLogging() 공개 정적인 메소드

Decreases the log enable counter and if it reaches -1 the logs are disabled.
Logging is enabled if the number of EnableLogging calls is greater than or equal to DisableLogging calls.
public static DisableLogging ( ) : IDisposable
리턴 IDisposable

EnableLogging() 공개 정적인 메소드

Increases the log enable counter and if it reaches 0 the logs are disabled.
Logging is enabled if the number of EnableLogging calls is greater than or equal to DisableLogging calls.
public static EnableLogging ( ) : void
리턴 void

Flush() 공개 정적인 메소드

Flush any pending log messages (in case of asynchronous targets) with the default timeout of 15 seconds.
public static Flush ( ) : void
리턴 void

Flush() 공개 정적인 메소드

Flush any pending log messages (in case of asynchronous targets).
public static Flush ( AsyncContinuation asyncContinuation ) : void
asyncContinuation AsyncContinuation The asynchronous continuation.
리턴 void

Flush() 공개 정적인 메소드

Flush any pending log messages (in case of asynchronous targets).
public static Flush ( AsyncContinuation asyncContinuation, System.TimeSpan timeout ) : void
asyncContinuation AsyncContinuation The asynchronous continuation.
timeout System.TimeSpan Maximum time to allow for the flush. Any messages after that time will be discarded.
리턴 void

Flush() 공개 정적인 메소드

Flush any pending log messages (in case of asynchronous targets).
public static Flush ( AsyncContinuation asyncContinuation, int timeoutMilliseconds ) : void
asyncContinuation AsyncContinuation The asynchronous continuation.
timeoutMilliseconds int Maximum time to allow for the flush. Any messages after that time will be discarded.
리턴 void

Flush() 공개 정적인 메소드

Flush any pending log messages (in case of asynchronous targets).
public static Flush ( System.TimeSpan timeout ) : void
timeout System.TimeSpan Maximum time to allow for the flush. Any messages after that time will be discarded.
리턴 void

Flush() 공개 정적인 메소드

Flush any pending log messages (in case of asynchronous targets).
public static Flush ( int timeoutMilliseconds ) : void
timeoutMilliseconds int Maximum time to allow for the flush. Any messages after that time will be discarded.
리턴 void

IsLoggingEnabled() 공개 정적인 메소드

Checks if logging is currently enabled.
Logging is enabled if the number of EnableLogging calls is greater than or equal to DisableLogging calls.
public static IsLoggingEnabled ( ) : bool
리턴 bool

ReconfigExistingLoggers() 공개 정적인 메소드

Loops through all loggers previously returned by GetLogger. and recalculates their target and filter list. Useful after modifying the configuration programmatically to ensure that all loggers have been properly configured.
public static ReconfigExistingLoggers ( ) : void
리턴 void

Shutdown() 공개 정적인 메소드

Dispose all targets, and shutdown logging.
public static Shutdown ( ) : void
리턴 void