Quantcast
Channel: Active questions tagged blazor - Stack Overflow
Viewing all articles
Browse latest Browse all 4839

Blazor WASM - Use Serilog to log to Server

$
0
0

I have a .NET 8 Blazor WASM web application. I am trying to implement Serilog to push logs back to my API Server application.

I saw this thread:Use serilog as logging provider in blazor webassembly client app

But it uses Serilog.Sinks.BrowserHttp which no longer works.

The problem is with the WebAssemblyHttpMessageHander. Which looks like a proper fix was released and confirmed by @Jernejk the OP. However, I can't find a working example of how they fixed it. They moved aware from WebAssemblyHttpMessageHander and are using HttpClient, but I can't figure out how to generate the proper HttpClient in this case.

Does anyone have a working example of how to use Serilog in Blazor WASM to write logs back to a file on the server?


Viewing all articles
Browse latest Browse all 4839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>