Exception Logging Tricks RRS feed

  • Question

  • Hi,

    Can anyone give me good pointers regarding exception logging. like what are the things to be taken care of in the custom Exception Logger classes . Also some people use reflection at some stages to log arguments and get the exception call stack. Is there any good article which talks about the same.


    Friday, January 30, 2009 3:02 PM

All replies

  • Hi MS Techie,

    Exception Handling
    • http://www.ece.cmu.edu/~koopman/des_s99/exceptions/

    Exception-handling best practices and patterns

    • http://best-practice-software-engineering.blogspot.com/2006/10/arch-exception-handling-best-practices.html

    Exception Handling Best Practices in .NET
    • http://www.codeproject.com/KB/architecture/exceptionbestpractices.aspx
    Exception Handling in Software Development
    • http://weblog.raganwald.com/2008/02/exception-handling-in-software.html
    Disadvantages of an exception handling technique in a conventional program
    • http://www.roseindia.net/tutorialsearch/?t=Disadvantages%20of%20an%20exception%20handling%20technique%20in%20a%20conventional%20program
    7 Good Rules to Log Exceptions
    • http://www.codemonkeyism.com/archives/2008/12/16/7-good-rules-to-log-exceptions/
    Hope that these links will help you out.

    Phijo Mathew Philip.

    Thursday, March 19, 2009 5:00 PM
  • I personally like the CodePlex.Diagnostics project.  You can find it at:

    CodePlex.Diagnostics Project

    We use a modified version of this, with most of the changes related to adherence to in-house coding policies and transport of both exceptions and log entries.  It does use reflection to build a very thorough snapshot of not just what caused the exception, but also what the user was doing at the time, as well as the state of the executing threads and machine state.

    A plus to this project, is that there is also a means to log standard log-type messages.  Very nice to have one standard library to handle both tasks.


    Monday, March 23, 2009 12:43 AM
  • Microsoft Exception Handling application block is worht a look - however, understand it properly before using it.

    You might find that you need a lot less that it offers, and the overhead of using it is too great.

    Hope this helps,

    MCSD, MCTS. Please mark my post as helpful if you find the information good!
    Sunday, April 5, 2009 11:02 AM