Scott on Writing

Musings on technical writing...

New Version of Error Logging Modules and Handlers (ELMAH) Available

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.

posted on Thursday, November 20, 2008 11:34 AM

Feedback

# re: New Version of Error Logging Modules and Handlers (ELMAH) Available 11/20/2008 12:31 PM Michael K. Campbell

Killer.

Any idea how well it plays with ASP.NET MVC? I'm getting ready to build a new MVC site and I'd be stupid not to have ELMAH in place. (My guess is that it should play fairly nicely - assuming I tell the MVC routing engine to leave requests into the instrumentation panels/pages alone....)

# re: New Version of Error Logging Modules and Handlers (ELMAH) Available 11/20/2008 6:15 PM Matt

Apache's Log4net (http://logging.apache.org/log4net) is another logging framework that can be set up in just a few minutes.

# re: New Version of Error Logging Modules and Handlers (ELMAH) Available 11/20/2008 6:21 PM Scott Mitchell

Matt, ELMAH is not a logging framework, per se. Rather, it's an ERROR logging library. It is not designed to log diagnostic or general errors, and has built in functionality to log unhandled exceptions in ASP.NET (unlike log4net).

# November 2008 Quick Hits 11/22/2008 6:31 AM John Stagich's Blog

November 2008 Quick Hits

# New Version of Error Logging Modules and Handlers (ELMAH) Available 11/22/2008 7:44 AM DotNetKicks.com

You've been kicked (a good thing) - Trackback from DotNetKicks.com

# re: New Version of Error Logging Modules and Handlers (ELMAH) Available 11/22/2008 8:00 AM Steven

Also CuttingEdge.Logging (http://codeplex.com/logging) can be set up in a matter of minutes. It has build-in support for a catch-all exception logging mechanism in web apps and build-in support for routing web events from the health monitoring system to the logging system.

Because of the architecture of CuttingEdge.Logging (it's build on the ASP.NET Provider model), it only runs on .NET 2.0 and up (but not only web applications).

# December 2008 Quick Hits 12/26/2008 10:15 AM John Stagich's Blog

December 2008 Quick Hits

# re: New Version of Error Logging Modules and Handlers (ELMAH) Available 1/28/2009 2:39 AM John

Elmah is good, but in the cases where I need to monitor a lot of sites on different servers I've found this free hosted service very convenient - you just install a module in your website, modify web.config and errors are stored in a convenient web interface

The Url is

http://www.spacebin.net/

Title:  
Name:  
Url:
Protected by Clearscreen.SharpHIPEnter the code you see:
Comments   

My Links

Ads Via DevMavens

Archives

Post Categories

 

I am a Microsoft MVP for ASP.NET.
I am an ASPInsider.
<July 2009>
SMTWTFS
2829301234
567891011
12131415161718
19202122232425
2627282930311
2345678

Comment Stats

DayTotal% of Total
Sunday 2046.9%
Monday 42314.3%
Tuesday 50116.9%
Wednesday 54518.4%
Thursday 57219.3%
Friday 53618.1%
Saturday 1856.2%
Total 2966100.0%

Hour1Total% of Total
12:00 AM 752.5%
1:00 AM 802.7%
2:00 AM 672.3%
3:00 AM 812.7%
4:00 AM 642.2%
5:00 AM 1234.1%
6:00 AM 1153.9%
7:00 AM 1755.9%
8:00 AM 1876.3%
9:00 AM 1565.3%
10:00 AM 1866.3%
11:00 AM 1926.5%
12:00 PM 1996.7%
1:00 PM 1846.2%
2:00 PM 1675.6%
3:00 PM 1344.5%
4:00 PM 1153.9%
5:00 PM 1063.6%
6:00 PM 993.3%
7:00 PM 1063.6%
8:00 PM 903.0%
9:00 PM 842.8%
10:00 PM 893.0%
11:00 PM 923.1%
Total 2966100.0%

Comments by Blog Entry Date/Time

Day Entry MadeAvg.Total
Sunday 4.91157
Monday 4.92379
Tuesday 4.21471
Wednesday 7.42668
Thursday 6.53666
Friday 5.11450
Saturday 4.73175
Total 5.512966

Hour1 Entry MadeAvg.Total
12:00 AM 5.2937
1:00 AM 1.002
5:00 AM 0.000
7:00 AM 4.0048
8:00 AM 4.16133
9:00 AM 6.04290
10:00 AM 5.83274
11:00 AM 4.36192
12:00 PM 6.44348
1:00 PM 3.14132
2:00 PM 5.04227
3:00 PM 7.97303
4:00 PM 3.8199
5:00 PM 6.00168
6:00 PM 4.56114
7:00 PM 8.95188
8:00 PM 8.58163
9:00 PM 5.00115
10:00 PM 6.31101
11:00 PM 4.5732
Total 5.512966

Learn More About Comment Stats
1 - All times GMT -8...


Blog Stats

Favorite Web Sites

My Books

My MSDN Articles