Contributing Quick Fixes
Support for writing custom quick fixes has been discontinued. Feel free to reach out if you have ideas for new quick fixes.
You have probably seen the new Fix tab on elmah.io. If not, check out the We don't just log your errors. We help you fix them! blog post. The Fix tab helps you fix errors fast, by providing quick fixes known from Visual Studio and relevant answers from Stack Overflow. The number of quick fixes are still limited, but that's something we want to change. We constantly look through the errors in our own logs and evaluate if any of those errors could need a quick fix.
Chances are that you experience other errors than we do. With the recent release on elmah.io, we support custom quick fixes through the new Elmah.Io.QuickFixes
(no longer available) repository on GitHub. By forking this repository, you will be able to create custom quick fixes, which will show up in the elmah.io UI.
Creating a new quick fix requires nothing more than a bit of C#:
public class ImATeapotDocumentationQuickFix : QuickFixBase
{
public ImATeapotDocumentationQuickFix()
{
Icon = "fa-coffee";
Url = new Uri("https://en.wikipedia.org/wiki/Hyper_Text_Coffee_Pot_Control_Protocol");
Text = "One does not simply brew a cup of tea";
}
public override bool CanFix(Message message)
{
return message.StatusCode.HasValue && message.StatusCode.Value == 418;
}
}
In this example, we create a new quick fix with a link to the Coffee Pot Control Protocol on Wikipedia on all errors with a status code of 418
.
To get started creating quick fixes for elmah.io, fork the Elmah.Io.QuickFixes
(no longer available) repository and add a new C# class. Additional documentation and examples are available in the repository as well.
elmah.io: Error logging and Uptime Monitoring for your web apps
This blog post is brought to you by elmah.io. elmah.io is error logging, uptime monitoring, deployment tracking, and service heartbeats for your .NET and JavaScript applications. Stop relying on your users to notify you when something is wrong or dig through hundreds of megabytes of log files spread across servers. With elmah.io, we store all of your log messages, notify you through popular channels like email, Slack, and Microsoft Teams, and help you fix errors fast.
See how we can help you monitor your website for crashes Monitor your website