Exception Block - Logging handler

Topics: Exception Handling Application Block
Jan 2, 2007 at 1:03 PM
I am just bit curious why Logging handler is not using already defined logging listener in Logging section.I have found that could be nice to log raised exception, but there is only log to Eventlog and has to be set below Exception block, why, is there any purpose, which I don't see?

For example I would like to have a notice (an email message) when something is gonna wrong (e.g. some external server supporting some data).

Bye bye Xabatcha
Jan 19, 2007 at 3:07 PM
The Logging Handler does use the TraceListeners in the Logging Application Block.

In your Logging Handler you specify a category in which to log the exception(s). The category is defined in the Logging Application Block and TraceListener(s) are assigned to log messages in that category. You can define as many TraceListeners to the category as you want, including the Email Trace Listener.




David Hayden
Microsoft MVP C#