I am a bit confused about how to use Elmah in the ASP.NET 5 / MVC 6 projects. I got the package from nuget and it added "Elmah.Mvc": "2.1.2"
to dependencies in project.json.
I am not sure where to go from here - back in the day, nuget would add entries to the web.config which is now gone. And I can't seem to find any examples on their github or elsewhere.
Am I missing something simple?
Instead of using ELMAH, it's not hard to implement error logging manually. This process will catch any exception that occurs in the project and log it to a database table. To do this, add the following to the Configure method in Startup.cs
Include this in Startup.cs as well:
Note that you will have to create a table in your database with the structure used in this function.