- Notifications
You must be signed in to change notification settings - Fork12
A console sink for the Blazor/Wasm environment
License
serilog/serilog-sinks-browserconsole
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
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 itsMicrosoft.AspNetCore.Components.WebAssembly dependency. Most users should choose the version ofSerilog.Sinks.BrowserConsole that matches their application's target framework. I.e. if you're targeting .NET 7.x, choose a 7.x version ofSerilog.Sinks.BrowserConsole. If you're targeting .NET 8.x, choose an 8.xSerilog.Sinks.BrowserConsole version, and so on.
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.
Configure the logging pipeline inProgram.Main():
// dotnet add package Serilog.Sinks.BrowserConsoleLog.Logger=newLoggerConfiguration().WriteTo.BrowserConsole().CreateLogger();Log.Information("Hello, browser!");
A more detailed example is availablein this repository.
About
A console sink for the Blazor/Wasm environment
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors4
Uh oh!
There was an error while loading.Please reload this page.
