Created
May 3, 2009 20:10
-
-
Save jbrechtel/106143 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Elmah; | |
using System.Collections; | |
namespace ElmahTest | |
{ | |
public class CustomSQLLog : Elmah.ErrorLog | |
{ | |
private readonly SqlErrorLog errorLog; | |
public CustomSQLLog(IDictionary config) : this() | |
{ | |
} | |
public CustomSQLLog() | |
{ | |
string connStr = "server=(local)\\sqlexpress;trusted_Connection=true;database=elmah"; | |
errorLog = new SqlErrorLog(connStr); | |
} | |
public override Elmah.ErrorLogEntry GetError(string id) | |
{ | |
return errorLog.GetError(id); | |
} | |
public override int GetErrors(int pageIndex, int pageSize, System.Collections.IList errorEntryList) | |
{ | |
return errorLog.GetErrors(pageIndex, pageSize, errorEntryList); | |
} | |
public override string Log(Elmah.Error error) | |
{ | |
return errorLog.Log(error); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment