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.

Seq Sink for Blazor

See original GitHub issue

I’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:closed
  • Created 4 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
nblumhardtcommented, Nov 9, 2019

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-browserhttp

Would be great to hear how this goes for you! 😎

1reaction
zbecknellcommented, Nov 8, 2019

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Seq Sink for Blazor · Issue #125 · datalust/serilog-sinks-seq
I'm developing a hosted Blazor Web Assembly app, so I wanted to add logging to Seq from the client in addition to the...
Read more >
Serilog - Seq Documentation
Datalust maintains a Serilog sink for Seq, which is released via NuGet. It supports all recent .NET versions.. ASP.NET Core. If your application...
Read more >
Relay Blazor client logs to Serilog in ASP.NET Core
Serilog.Sinks.BrowserHttp is a client-side sink that POST s newline-delimited, JSON-encoded log events from the browser to an HTTP endpoint ...
Read more >
Blazor Server Net 6 Serilog not Logging
I have a Blazor Server app and using Serilog. ... Sinks.Console", "Serilog.Sinks.File", "Serilog.Sinks.Seq", "Serilog.Sinks.
Read more >
Log Data Into File Using Serilog Framework In Blazor ...
The Serilog provides various sinks to log the data into file, MSSQL, etc. The serilog also supports ASP.net core and same sinks we...
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