1

I have a Blazor Server app in which I log requests/other stuff using ILogger (Serilog under the hood).

The problem is that when an unhandled exception occurs, the circuit breaks and that error is logged only to the browser console. I want to be able to log the exception in a global manner so that I can later check the logs (Seq) and address the issue. I already looked here https://github.com/dotnet/aspnetcore/issues/13452 but cannot wrap my head around a solution.

I don't think the question requires a code example.

notes404
  • 33
  • 4
  • 1
    Integration with Azure Application Insights provides very rich error logging, if you use EF you even get the SQL scripts before the error. If you also monitor any APIs with Insights then you can get a very detailed analysis of the environment, state and user interactions that lead to the error. It is entirely implemented through middleware, so you don't even need to alter your code to get this to work out of the box. – Chris Schaller Jul 17 '21 at 11:36
  • https://stackoverflow.com/questions/64040671/azure-application-insights-for-server-side-blazor – Steve Greene Jul 18 '21 at 13:38

0 Answers0