<PackageReference Include="NLog" Version="6.2.1" />

NLog.Targets.Wrappers.LimitingTargetWrapper

Limits the number of messages written per timespan to the wrapped target.
public Layout<TimeSpan> Interval { get; set; }

Gets or sets the interval in which messages will be written up to the MessageLimit number of messages.

public Layout<int> MessageLimit { get; set; }

Gets or sets the maximum allowed number of messages written per Interval.

public int MessagesWrittenCount { get; }

Gets the number of AsyncLogEventInfo written in the current Interval.

Initializes a new instance of the LimitingTargetWrapper class.

public LimitingTargetWrapper(string name, Target wrappedTarget)

Initializes a new instance of the LimitingTargetWrapper class.

public LimitingTargetWrapper(Target wrappedTarget)

Initializes a new instance of the LimitingTargetWrapper class.

public LimitingTargetWrapper(Target wrappedTarget, int messageLimit, TimeSpan interval)

Initializes a new instance of the LimitingTargetWrapper class.