question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

.Net Core 3.0 - ElmahExtensions.RiseError not logging

See original GitHub issue

I am using ElmahExtensions.RiseError in my global error handler. Since .net Core 3.0 it’s not working anymore. The call is made to RiseError, I do not get an exception, but nothing is logged and I don’t receive the email. If I remove the Global exception handler and throw an exception, Elmah sends the email correctly.

public override void OnException(ExceptionContext context) { ... ElmahExtensions.RiseError(context.Exception); base.OnException(context); }

I also tested ElmahExtensions.RiseError directly in my controller and I have the same issue. Nothing is logged.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5

github_iconTop GitHub Comments

2reactions
AlexScigalszkycommented, May 13, 2020

On .Net Core 3.1, it not working

0reactions
MohsenZeinalycommented, Sep 22, 2021

i can solve this problem with use ElmahExtensions class in my controller

ElmahExtensions.RiseError(new Exception(“your msg”));

Read more comments on GitHub >

github_iconTop Results From Across the Web

Elmah for .NET Core - manually logging
I am trying to find a method that looks something like this: Elmah.EntryWrite(errorInfo) and that method then stores the information in the ...
Read more >
Logging Error Details with ELMAH (C#)
ELMAH is a free, open source error logging library that includes features like error filtering and the ability to view the error log...
Read more >
Logging from ASP.NET Core - elmah.io Documentation
To log all warnings and errors from ASP.NET Core, install the following NuGet package: Install-Package Elmah.Io.AspNetCore. Call the AddElmahIo method.
Read more >
How-to handle exceptions and save error logs to SQL in ...
How-to handle exceptions and save error logs to SQL in ASP .NET Core · Step 1:Download ElmahCore · Step 2: Changes in Startup.cs...
Read more >
Logging in .NET Core and ASP.NET Core
Learn how to use the logging framework provided by the Microsoft.Extensions.Logging NuGet package.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found