C# 클래스 NLog.Targets.Wrappers.LimitingTargetWrapper

상속: NLog.Targets.Wrappers.WrapperTargetBase
파일 보기 프로젝트 열기: NLog/NLog 1 사용 예제들

Private Properties

프로퍼티 타입 설명
IsIntervalExpired bool
ResetInterval void

공개 메소드들

메소드 설명
LimitingTargetWrapper ( ) : System

Initializes a new instance of the LimitingTargetWrapper class.

LimitingTargetWrapper ( Target wrappedTarget ) : System

Initializes a new instance of the LimitingTargetWrapper class.

LimitingTargetWrapper ( Target wrappedTarget, int messageLimit, System.TimeSpan interval ) : System

Initializes a new instance of the LimitingTargetWrapper class.

LimitingTargetWrapper ( string name, Target wrappedTarget ) : System

Initializes a new instance of the LimitingTargetWrapper class.

보호된 메소드들

메소드 설명
InitializeTarget ( ) : void

Initializes the target and resets the current Interval and MessagesWrittenCount.

Write ( NLog.Common.AsyncLogEventInfo logEvent ) : void

Writes log event to the wrapped target if the current MessagesWrittenCount is lower than MessageLimit. If the MessageLimit is already reached, no log event will be written to the wrapped target. MessagesWrittenCount resets when the current Interval is expired.

비공개 메소드들

메소드 설명
IsIntervalExpired ( ) : bool
ResetInterval ( ) : void

메소드 상세

InitializeTarget() 보호된 메소드

Initializes the target and resets the current Interval and MessagesWrittenCount.
protected InitializeTarget ( ) : void
리턴 void

LimitingTargetWrapper() 공개 메소드

Initializes a new instance of the LimitingTargetWrapper class.
public LimitingTargetWrapper ( ) : System
리턴 System

LimitingTargetWrapper() 공개 메소드

Initializes a new instance of the LimitingTargetWrapper class.
public LimitingTargetWrapper ( Target wrappedTarget ) : System
wrappedTarget Target The wrapped target.
리턴 System

LimitingTargetWrapper() 공개 메소드

Initializes a new instance of the LimitingTargetWrapper class.
public LimitingTargetWrapper ( Target wrappedTarget, int messageLimit, System.TimeSpan interval ) : System
wrappedTarget Target The wrapped target.
messageLimit int Maximum number of messages written per interval.
interval System.TimeSpan Interval in which the maximum number of messages can be written.
리턴 System

LimitingTargetWrapper() 공개 메소드

Initializes a new instance of the LimitingTargetWrapper class.
public LimitingTargetWrapper ( string name, Target wrappedTarget ) : System
name string The name of the target.
wrappedTarget Target The wrapped target.
리턴 System

Write() 보호된 메소드

Writes log event to the wrapped target if the current MessagesWrittenCount is lower than MessageLimit. If the MessageLimit is already reached, no log event will be written to the wrapped target. MessagesWrittenCount resets when the current Interval is expired.
protected Write ( NLog.Common.AsyncLogEventInfo logEvent ) : void
logEvent NLog.Common.AsyncLogEventInfo Log event to be written out.
리턴 void