Ads by Lake Quincy Media

Wiki Navigation

 
Gibraltar - Learn about the best analysis tool for NLog

BufferingWrapper target

NLog documentation is currently being re-organized to use the wiki format. Some content is still missing or incomplete.
We need volunteers to help maintain and organize this Wiki. Please contact Jarek if you are interested in helping out.

A target that buffers log events and sends them in batches to the wrapped target. 

Supported in

Configuration Syntax

<targets>
  <target xsi:type="BufferingWrapper"
          name="String"
          slidingTimeout="Boolean"
          bufferSize="Integer"
          flushTimeout="Integer">
    <target xsi:type="wrappedTargetType" ...target properties... />
  </target>
</targets>
Read more about using the Configuration File.

Parameters

  • General Options
  • name - Name of the target.
  • Buffering Options
  • slidingTimeout - Indicates whether to use sliding timeout.Boolean Default: True
    This value determines how the inactivity period is determined. If sliding timeout is enabled, the inactivity timer is reset after each write, if it is disabled - inactivity timer will count from the first event written to the buffer.
    This parameter is not supported in:
    • NLog v1.0 for .NET Compact Framework 1.0
    • NLog v1.0 for .NET Compact Framework 2.0
    • NLog v1.0 for .NET Framework 1.0
    • NLog v1.0 for .NET Framework 1.1
    • NLog v1.0 for .NET Framework 2.0
  • bufferSize - Number of log events to be buffered.Integer Default: 100
  • flushTimeout - Timeout (in milliseconds) after which the contents of buffer will be flushed if there's no write in the specified period of time. Use -1 to disable timed flushes.Integer Default: -1
Ads by Lake Quincy Media