Install
| Product | Versions |
|---|---|
| .NET |
README
Serilog.Sinks.BrowserConsole

A Serilog sink that takes advantage of the unique features of the browser console in the Blazor/WASM applications.
Versioning: This package tracks the versioning and target framework support of its Microsoft.AspNetCore.Components.WebAssembly dependency. Most users should choose the version of Serilog.Sinks.BrowserConsole that matches their application's target framework. I.e. if you're targeting .NET 7.x, choose a 7.x version of Serilog.Sinks.BrowserConsole. If you're targeting .NET 8.x, choose an 8.x Serilog.Sinks.BrowserConsole version, and so on.
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
Configure the logging pipeline in Program.Main():
// dotnet add package Serilog.Sinks.BrowserConsole
Log.Logger = new LoggerConfiguration()
.WriteTo.BrowserConsole()
.CreateLogger();
Log.Information("Hello, browser!");
A more detailed example is available in this repository.
Changes from Previous Version
Adoption Assessment
A verified publisher signal is available. Assess fit from the package's supported frameworks, license and dependency graph rather than popularity alone.
Related Guides & Workflows
Learn how to evaluate, integrate, or audit this package in your .NET project.