I've posted code that simplifies catching and logging exceptions via a pluggable architecture (it's based on the Exception Management Application Block from Microsoft). There is a readme file in the “Misc” folder. Bear in mind that this is still a “Work In Progress”, I will release updates as I make them. Also, don't open the .sln file, instead just use the .csproj file and create your own solution. The SQLPublisher class needs a bit of work, it's just kind of a reference for now. The architecture is pretty straightforward, and it's completely pluggable for custom modules should you care to write one. As of now there are classes for SQL Server, SMTP, File I/O, WMI, and XML publishing, each deriving from a base class that takes care of the formatting. Future updates will include a more robust logging mechanism that will allow you to specify the level of exceptions to log (i.e. Information, Verbose, Error, Warning, etc...corresponding to the System.Diagnostics.TraceLevel enumeration).



No comments yet