Fremus.co.za

Demistifying Life and Web Development

Logging frameworks for C#

I find myself going to StackOverflow a lot recently if I need to search for an opinion on something related to C# or ASP.NET. Strangely you will find that in the first 10 results of a Google search you will find one, maybe two, pointing to StackOverflow. I digress, and the reason I am writing this particular blogpost is to make a list of logging frameworks available to .NET (C#) developers.

Before I go into identifying a few possible solutions I need to try and understand what my need is and what it is I want to achieve. I am going to be tackling various ASP.NET MVC projects within the next two to three months, and I cannot possibly see myself knowing where all the exceptions in my application will happen, or even try and code in such a way that all my try{}catch{} statements catch the correct exception. At the same time there is no excuse to overlook an exception if it happens more than once, you have to handle it. Having noticed how many exceptions a WCF service can throw I know for a fact that I cannot know all the exceptions beforehand either, so I need something, a tool that allows me to see the exceptions, and add it to my code so I can catch them. So the basic need is simple, have a mechanism in place that allows exceptions in my system to be caught.

You might be going, OMW you don’t log? Well I have been with several development teams and I can tell you that not a lot of development teams log system errors. And there is a host of other things they also don’t do, but that is not a part of this blog post.

I searched StackOverflow, and to me it seems there are a couple of choices available for logging in the .NET world:

Maybe I need to consider all the features offered and decide on the best alternative, which would be:

  • Ease of installation
  • Ease of getting to the exception logs

My intention is to start looking at each one of these this week, and make a decision by the end of the week.

  • Share/Bookmark
posted by fr3dr1k in C# and have No Comments

Place your comment

Please fill your data and comment below.
Name
Email
Website
Your comment
Get Adobe Flash playerPlugin by wpburn.com wordpress themes