Logging in .NET with NLog (default config file, catch all exceptions and route to logger, ...)

/ Published in: C#
Save to your folder(s)

[NLog](http://nlog-project.org) is an awesome, simple logging solution for .NET. In the code below, there is an example entry into app.config (there are other methods for doing NLog config files, but I have found that this one works with ClickOnce deployments). There is also a snippet for catching and logging all exceptions in a WinForms application and one for a WPF application.

I also have a [question on stackoverflow](http://stackoverflow.com/questions/4091606/most-useful-nlog-configurations) with a lot of useful NLog configuration answers.

URL: http://nlog-project.org

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.