1
0
Fork
You've already forked Elmah.FallbackErrorLog
0
Composite ErrorLog for Elmah (fallback behavior)
  • C# 100%
Find a file
2013年02月17日 21:02:17 +01:00
App_Readme Initial commit 2013年02月04日 22:46:37 +01:00
Configuration Minor update 2013年02月05日 22:10:42 +01:00
packages Initial commit 2013年02月04日 22:46:37 +01:00
Properties Correction of a pagination bug 2013年02月17日 20:55:56 +01:00
.gitattributes Initial commit 2013年02月04日 22:46:37 +01:00
.gitignore Minor update 2013年02月05日 22:10:42 +01:00
Elmah.FallbackErrorLog.csproj Minor update 2013年02月17日 21:02:17 +01:00
Elmah.FallbackErrorLog.nuspec Minor update 2013年02月17日 21:02:17 +01:00
Elmah.FallbackErrorLog.sln Initial commit 2013年02月04日 22:46:37 +01:00
FallbackErrorLog.cs Correction of a pagination bug 2013年02月17日 20:55:56 +01:00
packages.config Initial commit 2013年02月04日 22:46:37 +01:00
readme.md Correction of a pagination bug 2013年02月17日 20:55:56 +01:00
TestLogException.cs Correction of a pagination bug 2013年02月17日 20:55:56 +01:00

ELMAH Fallback ErrorLog

What is it ?

It's just an composite implementation of the Elmah.ErrorLog abstract class to add fallback feature to ELMAH.

You can copy the source into your projects or install the nuget package.

Configuration sample

Typical legacy Elmah configuration

<configuration>
 <configSections>
 <sectionGroup name="elmah">
 <section name="security" requirePermission="false" type="Elmah.SecuritySectionHandler, Elmah" />
 <section name="errorLog" requirePermission="false" type="Elmah.ErrorLogSectionHandler, Elmah" />
 <section name="errorMail" requirePermission="false" type="Elmah.ErrorMailSectionHandler, Elmah" />
 <section name="errorFilter" requirePermission="false" type="Elmah.ErrorFilterSectionHandler, Elmah" />
 </sectionGroup>
 </configSections>
 <elmah>
	<errorLog type="Elmah.SqlErrorLog, Elmah" connectionStringName="DB_ELMAH" applicationName="Blog" >
	<!-- OR...
	<errorLog type="Elmah.XmlFileErrorLog, Elmah" logPath="~/App_Data/Logs" />
	-->
 </elmah>
</configuration>

New configuration with fallback feature :

<configuration>
 <configSections>
 <sectionGroup name="elmah">
 <section name="security" requirePermission="false" type="Elmah.SecuritySectionHandler, Elmah" />
 <section name="errorLog" requirePermission="false" type="Elmah.FallbackErrorLogSectionHandler, Elmah.FallbackErrorLog" />
 <section name="errorMail" requirePermission="false" type="Elmah.ErrorMailSectionHandler, Elmah" />
 <section name="errorFilter" requirePermission="false" type="Elmah.ErrorFilterSectionHandler, Elmah" />
 </sectionGroup>
 </configSections>
 <elmah>
 <errorLog type="Elmah.FallbackErrorLog, Elmah.FallbackErrorLog" >
		<add type="Elmah.SqlErrorLog, Elmah" connectionStringName="DB_ELMAH" applicationName="Blog" />
		<add type="Elmah.XmlFileErrorLog, Elmah" logPath="~/App_Data/Logs" />
		<add type="Elmah.MemoryErrorLog, Elmah" size="30" />
	</errorLog>
 </elmah>
</configuration>

Limitations, caveats, known bugs

  • Limit on the number of items that can be paginated (approx. 800k !) on the error log display page.

Let me know if you have troubles with use of this library.

See also

A very nice article about ELMAH : ELMAH - Error Logging Modules And Handlers