-
Notifications
You must be signed in to change notification settings - Fork 1.4k
LimitingWrapper target
Rolf Kristensen edited this page Nov 23, 2021
·
9 revisions
Limits the number of logs written to the wrapped target in a given time interval.
Platforms Supported: All
Introduced in NLog 4.4.
<targets>
<target xsi:type="LimitingWrapper"
name="String"
messageLimit="Integer"
interval="TimeSpan">
<target xsi:type="wrappedTargetType" ...target properties... />
</target>
</targets>
- name - Name of the target.
-
messageLimit - Indicates the maximum number of log events written per Interval. Log events in the current interval received after the message limit has been reached will be discarded.
Integer
Default:1000
-
interval - Indicates a time interval in which messages will be written up to the maximum number of messages (messageLimit).
TimeSpan
Default:"01:00"
(1 hour)
- Troubleshooting Guide - See available NLog Targets and Layouts: https://nlog-project.org/config
- Getting started
- How to use structured logging
- Troubleshooting
- FAQ
- Articles about NLog
-
All targets, layouts and layout renderers
Popular: - Using NLog with NLog.config
- Using NLog with appsettings.json