Property | Type | Description | |
---|---|---|---|
IsIntervalExpired | bool | ||
ResetInterval | void |
Method | Description | |
---|---|---|
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.
|
Method | Description | |
---|---|---|
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.
|
Method | Description | |
---|---|---|
IsIntervalExpired ( ) : bool | ||
ResetInterval ( ) : void |
public LimitingTargetWrapper ( Target wrappedTarget ) : System | ||
wrappedTarget | Target | The wrapped target. |
return | System |
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. |
return | System |
public LimitingTargetWrapper ( string name, Target wrappedTarget ) : System | ||
name | string | The name of the target. |
wrappedTarget | Target | The wrapped target. |
return | System |
protected Write ( NLog.Common.AsyncLogEventInfo logEvent ) : void | ||
logEvent | NLog.Common.AsyncLogEventInfo | Log event to be written out. |
return | void |