A console sink for the Blazor/Wasm environment
Switch branches/tags
Nothing to show
Clone or download
nblumhardt Merge pull request #4 from nblumhardt/dev
Remove the older non-working example
Latest commit 55b3974 Oct 8, 2018


Serilog.Sinks.BrowserConsole Build status NuGet Pre Release

A console sink for the Blazor/Wasm environment.

What's it do?

The sink writes log events to the browser console. Unlike the normal Serilog console sink, which writes out formatted text, this sink takes advantage of the unique capabilities of the browser console to print interactive, fully-structured data.


Getting started

The sink is compatible with .NET Standard 2.0 and is built against Blazor 0.6.

Configure the logging pipeline in Program.Main():

// dotnet add package Serilog.Sinks.BrowserConsole -v ...

Log.Logger = new LoggerConfiguration()

Log.Information("Hello, browser!");

A more detailed example is available in this repository.