Seq Sink for Blazor
See original GitHub issueI’ve started evaluating Seq by using it for local Blazor development. I’m developing a hosted Blazor Web Assembly app, so I wanted to add logging to Seq from the client in addition to the server-side logging enabled by this sink. It turns out this is quite trivial to get set up initially, as you can see in this fork.
I added the Microsoft.AspNetCore.Blazor.HttpClient
package to the project and was able to find out that as long as the setup is done in Startup.Configure()
and later it works (this is a Blazor HttpClient
limitation right now from what I can tell).
I wanted to bring this to your attention in case you wanted to add a new Seq Blazor sink. I’ll be using this rough draft for now and testing out its limitations as I continue development but do hope to see an official version at some point that I can contribute to.
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (4 by maintainers)
Top GitHub Comments
I’ve updated the ingestion middleware and
BrowserHttp
sink in my example repo and pushed some (completely untested) packages: https://github.com/nblumhardt/serilog-sinks-browserhttpWould be great to hear how this goes for you! 😎
That makes sense to me for a direct browser scenario, but my knowledge of the area is pretty shallow. It makes sense to create a solution that could be used across multiple log servers as well, so it seems effort would be well spent in that direction. I’m just now getting to starting the
BrowserHttp
route, so I’ll let you know how that goes.