BufferingWrapper target
设置一个缓冲区,保存日志信息,然后批量写入日志
语法:
<targets> <target xsi:type="BufferingWrapper" name="String" slidingTimeout="Boolean" bufferSize="Integer" flushTimeout="Integer"> <target xsi:type="wrappedTargetType" ...target properties... /> </target></targets> |
参数
一般配置
name - target.的名称
缓冲设置
slidingTimeout -是否使用sliding timeout。默认: 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 - 一个缓冲区能够缓存多少日志。默认:100
flushTimeout - Timeout (秒) 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.默认: -1
浙公网安备 33010602011771号