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. ELMAH does not work with ASP.NET 5 because ELMAH (given its name) is based on ASP.NET 4.x’s Modules and Handlers (the ‘MAH’ of ‘ELMAH’). There is a prototype in ASP.NET 5 called ‘ELM’ (Error Logging Middleware) that has some features similar to ELMAH. This post is about using ELM in ASP.NET 5.
This post is about configuring ELMAH in ASP.NET Core.
- First you need to update project.json file and add reference of ELM.
- Next you need to configure the Startup file ConfigureServices and Configure methods to support ELM.
Now if you browse http://localhost:5004/elm, you can see the logging information. Due to line break characters in style, the CSS is not working properly.