ELMAH is a free, open-source library created by Atif Aziz for logging errors that occur in an ASP.NET application. I've written about ELMAH many times before; its one of the first things I setup when creating a new ASP.NET application. A new version - ELMAH 1.0 BETA 3 - was recently released.
With just a few minutes of setup and configuration you can have ELMAH automatically log unhandled exceptions to a number of different data stores - SQL Server, Oracle, a Microsoft Access database, an XML file, to an e-mail address, and so on. You can also write code to proactively record an error via the ELMAH library. Granted, ASP.NET provides some built-in support for logging errors via its health monitoring system, but ELMAH is a simpler version of the health monitoring system that focuses specifically on error logging and is easier to configure. It also works in ASP.NET 1.x applications, whereas health monitoring is only available in ASP.NET 2.0 and up. What's more, ELMAH provides a built-in web page and RSS support for viewing error information.
So, what's new in ELMAH 1.0 BETA 3? The project page and issue tracker has the full set of details, but in a nutshell here are the enhancements that most interest me:
- Three new error logging sources: Oracle, Microsoft Access, and VistaDB.
- Log errors in AJAX applications.
- Addition of an ErrorLogDataSourceAdapter, which you can use with the ObjectDataSource to declaratively work with the error log details from an ASP.NET page.
It is imperative that every web application in production log errors and report those errors to the development team. ELMAH offers this important functionality and can be setup, configured, and customized within a few minutes.