-
Notifications
You must be signed in to change notification settings - Fork 1.4k
RetryingWrapper target
Rolf Kristensen edited this page Nov 22, 2021
·
12 revisions
Retries in case of write error.
Platforms Supported: All
<targets>
<target xsi:type="RetryingWrapper" name="String" retryDelayMilliseconds="Integer" retryCount="Integer">
<target xsi:type="wrappedTargetType" ...target properties... />
</target>
</targets>
- name - Name of the target.
-
retryDelayMilliseconds - Time to wait between retries in milliseconds. Integer Default: 100
-
retryCount - Number of retries that should be attempted on the wrapped target in case of a failure. Integer Default: 3
-
enableBatchWrite - Allow batch writes, and only introduced retry delay once before retrying the batch items one at a time.
Introduced with NLog 5.0
When failure occurs, then the retry will perform a synchronous delay. To avoid blocking the application-thread in the retry-sleep, then consider using AsyncWrapper like this:
- AsyncWrapper -> RetryWrapper -> Actual Target
- 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