I have a simple .Net core (2.2) Console application. I am trying to configure it to work with NLog. For simplicity, I am using "File" target. I am trying to configure Buffering Wrapper so I wrapped the target as follows:
<target name="bufferWrapper" xsi:type="BufferingWrapper" bufferSize="100">
<target name="logfile" xsi:type="File" fileName="file.txt" />
</target>
When I stop in debug mode at a breakpoint immediately after writing to Nlog:
Logger.Info("Hello world");
I see that the log entry has already been added to "file.txt".
I would have expected it flushed the entries to the file only after accumulating 100 log entries (as bufferSize=100
).
Thanks for any help