Steven Bey

Error Logging Filter and Route (ELFAR) for ASP.NET MVC

Error Logging Filter and Route (ELFAR) for ASP.NET MVC was inspired by and based on the popular Error Logging Modules and Handlers (ELMAH) for ASP.NET utility. ELFAR retains the familiar ELMAH user interface but has been built to utilise the architecture of ASP.NET MVC. Unlike ELMAH, ELFAR is not driven by configuration and can be added to your website/web application with just 3 lines of code (usually in the Application_Start method):

var provider = new ErrorLogProvider();
GlobalFilters.Filters.Add(new ErrorLogFilter(provider));
RouteTable.Routes.Insert(0, new ErrorLogRoute(provider));

To access ELFAR, navigate to ~/elfar (where ~/ is the root directory of the MVC application).

ELFAR has 6 out-of-the-box error log providers (which can be downloaded from Nuget)

However you can pass in your own ErrorLog provider by implementing the [IErrorLogProvider] interface.

Once ELFAR has been added to your website/web application, you get the following features:

  • a web page to view a list of error logs
  • a web page to view the details of an error log, including a coloured stack trace
  • a view of the original yellow screen of death (where appropriate)
  • XML and JSON downloads of the error log
  • an RSS feed of the last 15 error logs
  • an RSS digest of daily error logs (limited to 900)
  • a CSV download of all error logs

In addition, there are several optional features available:


Wiki: AccessErrorLogProvider
Wiki: Email notification of errors
Wiki: ErrorLogProvider
Wiki: Excluding unwanted exceptions
Wiki: IErrorLogProvider
Wiki: Posting errors to Twitter
Wiki: Restricting access to the ELFAR web pages
Wiki: SQLiteErrorLogProvider
Wiki: SqlCeErrorLogProvider
Wiki: SqlErrorLogProvider
Wiki: XmlErrorLogProvider

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks