Logging Guidance Needed

Topics: Logging Application Block
Mar 31, 2008 at 5:54 PM
I'm just starting out with the Logging block and am in need of some guidance. I've read through the help file and found some online resources, but I still have a few unanswered questions.

1) What is the Logging Errors & Warnings special source?

2) I've seen suggestions to create categories such as "Debug, Information, Error." How do these differ from the TraceSourceLevel used by the sources? Where does priority fit in?


Here is what I think I want, but I'm not sure of the "best" way to go about setting this up.
  • To log exceptions throughout my application.
  • To log information level data.
  • To log debug level information.
  • To have critical logging events notify me via email when they occur.
  • Perhaps have some categories such as "Data" and "Service" for various tiers in the application.

Can someone suggest a general strategy for implementing the above? The mechanics of configuring the listeners and sources seems easy enough. I'm mostly looking for best practices, when to use categories, etc.

Thanks!