With each project that I develop, I typically carry over, from one project to the next, a clunky custom HttpModule for watching for exceptions and logging/reporting them, accordingly. With each application I write, I tweak it a bit more to be a little more useful. But I've officially thrown my custom module away in favor of the open source ELMAH: Error Loggin Modules and Handlers for ASP.NET (and ASP.NET MVC).
ELMAH "is an application-wide error logging facility that is completely pluggable." With a trivial amount of setup, you configurably get: basic logging, a web page for viewing errors, review capabilities of the original YSOD (or yellow merengue), email notifications, even an RSS feed of the last 15 errors from the log. I.e., about a magnitude more than the custom HttpModule I've been carrying around for years.
Here's how to get up and running with ELMAH integrated into your ASP.NET MVC project (including S#arp projects) in less than 7.5 minutes:
Yes, it's just that easy...yes even easier than the Super Bass-O-Matic '76. If you need to do more, there's plenty of info in the project wiki at http://code.google.com/p/elmah/w/list. (I have to give a nod to Hong Lim, a developer I work with, for recommending this tool to the dev team; and coincidentally Simone Busoli on the S#arp Architecture forums. Thanks guys!)
Billy McCafferty
http://www.itsamuraischool.com
Posted
05-28-2009 5:04 PM
by
Billy McCafferty