serilog-sinks-browserconsole
serilog-sinks-browserconsole copied to clipboard
Portability on Blazor Server
Hi,
I'd like to have this sink work in a Blazor Server app. Is there a workaround to do it? Or would it need a completely different implementation?
Test project : https://github.com/sinsedrix/serilog-sinks-browserconsole / example/ExampleServer
Hi! On the server, Serilog.Sinks.Console is the better option. Any reason to prefer this package?
@nblumhardt The goal is to render server logs to browser console in a test environment. Test users won't be able to see console logs so I thought this sink would be suitable.
Thanks for your reply, Cédric. This would require a completely different implementation, unfortunately (e.g. a sink that captured log events server-side, serialized them, and sent them to some client-side code for display in the browser terminal, perhaps via WebSockets - nontrivial :-))
Hope this helps, Nick
Ok @nblumhardt , I implemented the log provider I needed in the test project I mentioned above. It behaves well but isn't a Serilog sink.