I’m approaching the end of a C#/ASP.NET project I am developing, and I’ll have to support this project among other C# projects for the foreseeable future. I really need a nice, simple and global way to log all details of any exception that’s been generated, and either email me/log to a database/etc, but also display a ‘simple’ version to the user.
What solutions are available for C# currently? Also, as my program is nearly finished without logging capabilities, it’d be great to somehow execute my logging code whenever an exception is thrown, without explicitly calling that.
log4net from apache and logging block from best practices and patterns from microsoft.
If you have your custom exception, you can include the logging capabilities to it.