Logging to elmah.io from Umbraco
Since Umbraco itself is written in ASP.NET, ELMAH works like a dream inside Umbraco. Besides logging uncaught errors, elmah.io also supports other types of messages like information and debug. In fact, all the log levels that you already know from log4net, NLog and Serilog, are supported on elmah.io as well. Logging in Umbraco CMS is based on Serilog, which elmah.io also support. We have brought all these pieces together into a NuGet package that we call: Elmah.Io.Umbraco.
To start utilizing elmah.io from your Umbraco site, all you need to do is install the
Hit F5 and watch messages start flowing into elmah.io.
When using Umbraco Cloud, you may not have a local clone of the source code. To install elmah.io on Umbraco cloud, execute the following steps:
Clone your Umbraco Cloud project to a local folder as explained here: Visual Studio Setup.
- Commit and push all changes to the git respository. This will add elmah.io logging to your remote Umbraco Cloud project.
In case you want logging to different elmah.io logs from each Umbraco Cloud environment, please check out Umbraco's support for config transformations here: Config transforms.
The Elmah.Io.Umbraco package basically installs and configures three things:
- The elmah.io Serilog sink (Warning and above)
- An Umbraco content finder for logging 404's
- ELMAH with elmah.io as error log
All unhandled exceptions from both ASP.NET / MVC / Web API as well as 404's are logged automatically. Warnings, errors and fatal messages logged through Serilog are send to elmah.io as well.
If you are running on the default Umbraco template, all nessecary configuration is added during installation of the
Elmah.Io.Umbraco NuGet package. If your
web.config file for some reason aren't updated during installation, you can configure elmah.io manually: Configure elmah.io manually. Likewise, the installer configure the elmah.io sink for Serilog in your
We still support Umbraco 7 through Elmah.Io.Umbraco 3.2.35:
Install-Package Elmah.Io.Umbraco -Version 3.2.35
New features will be added to the updated package for Umbraco 8 only.
This article was brought to you by the elmah.io team. elmah.io is the best error management system for .NET web applications. We monitor your website, alert you when errors start happening and help you fix errors fast.