How to handle internal NLog exceptions?

13 views
Skip to first unread message

Mans Mans

unread,
Jan 11, 2017, 4:34:33 AM1/11/17
to NLog-Users
Hello! I begin with an example. I have a C# application with logging by NLog to database on a specific server. 
If server down or there is a connection issues, NLog throws exception to main thread and it passed by domain unhadled exception catcher. Unfortunatelly it terminates application, so it down. This happen if I set "throwexceptions = true".
If I set "throwexceptions = false", application continues to work BUT I even don't realize that NLog stopped logging and this is very important for my application. It won't store unstored logs when connection will be ok.

So I would like ask - is there a way handle internal NLog exceptions? If there would be some event I could use to store not_stored logs to write them later when connection establish... I would be sooo happy (c) :)
Reply all
Reply to author
Forward
0 new messages