NLog: Force BufferingTargetWrapper to empty on AppDomain UnhandledException
- by Superdumbell
I have NLog configured in my application to to use the BufferingTargetWrapper for sending emails with the MailTarget.
The problem I'm running into is I can not find a way to force NLog to empty the BufferingTargetWrapper before the application exits from Unhandled Exceptions.
I tried calling LogManager.Flush() and LogManager.DisableLogging() from…