Issues with creation of Custom Trace Listener

Topics: Logging Application Block
Oct 8, 2010 at 9:03 AM

This is in response to this workitem.

The reason why it's not logging is because of the value you set for the Severity property.  It should be greater than zero. I also suggest you use the enumeration values of System.Diagnostics.TraceEventType rather than using an integer so as to make sure you're using an accurate value for that property. 

By the way, there are also missing parameters to the stored procedure you included in the attachment.  I had to add value for some columns that don't allow null values so make sure to fix those to make sure logging will not fail.   And additional info, even when an exception occurs while logging, it won't be propagated to the user so you won't be able to catch any exception outside.


Sarah Urmeneta
Global Technology and Solutions
Avanade, Inc.