We are getting different behaviors when enabling Aync logging by using AsyncWrapper. As I know there are 2 ways to enable this.
- by using <targets async =" true">
- by providing a new target by using <target name="asyncWrapper" xsi:type="AsyncWrapper" queueLimit="5000" overflowAction="Grow">
The option 1 is fast and i can see that my logs are written on a different thread. I can see that 50000 log messages are being written when program control comes back. The only problem here is, log messages are lost.
The option 2 is not at all working. It seems that NLog writes messages synchronously and doesn't return control.
Are we missing any NLog specific configuration for option number 2?
Attached is the configuration file I am using.