brettwgreen / elmah-mongodb

MongoDB provider for Elmah

Home Page:http://www.captaincodeman.com/2011/05/28/elmah-error-logging-official-10gen-mongodb-driver/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Elmah-MongoDB

Overview

ELMAH (Error Logging Modules and Handlers) is an application-wide error logging facility that is completely pluggable. It can be dynamically added to a running ASP.NET web application, or even all ASP.NET web applications on a machine, without any need for re-compilation or re-deployment.

This provider enables MongoDB to be used as the back-end storage via the Official .NET/C# 2.0 Driver.

Usage

The easiest way to add this to a project is via the Elmah.MongoDB.Driver NuGET package which will add the required assemblies to your project.

The provider supports multiple per-application collections within a single database and will automatically create a MongoDB Capped Collection called 'Elmah' if the application name is not set or will use Elmah-ApplicationName if it is.

The size of the MongoDB collection can be controlled by setting the maxSize (bytes) and maxDocuments properties. By default a 100mb collection is used (with no document limit).

Configuration

Here is an example configuration:

<elmah>
  <errorLog type="Elmah.MongoErrorLog, Elmah.MongoDB" connectionStringName="Elmah.MongoDB" maxSize="10485760" maxDocuments="10000"/>
</elmah>
<connectionStrings>
  <add name="Elmah.MongoDB" connectionString="mongodb://localhost/elmah"/>
</connectionStrings>

About

MongoDB provider for Elmah

http://www.captaincodeman.com/2011/05/28/elmah-error-logging-official-10gen-mongodb-driver/


Languages

Language:C# 90.3%Language:CSS 5.5%Language:JavaScript 2.8%Language:Batchfile 0.8%Language:ASP 0.6%