best way to log all details of an exception?

Topics: Logging Application Block
Apr 14, 2009 at 10:49 PM
I am pretty new to the logging application block.  What is the best way to ensure all details of an exception are logged?   Specifically, I am interested in Exception.StackTrace, Exception.Message, and Exception.Data.    Would be nice to include contextual information as well like Request.QueryString and Request.UserHostAddress as well.  Is there a good way to do this or do I just need to stuff all that stuff into extended props dictionary?   I didn't see any overloads on the Logger.LogEntry that just take in an Exception.


Apr 15, 2009 at 5:49 AM
Edited Apr 15, 2009 at 5:50 AM

You can use the exception handling application block with a logging handler, the logging handler will log the exception message, stack trace and For more details see this :

Valiant Dudan
Global Technology and Solutions
Avanade, Inc.