serilog / serilog-sinks-browserconsole

A console sink for the Blazor/Wasm environment

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

Serilog.Sinks.BrowserConsole

Getting started

Configure the logging pipeline in Program.Main():

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

Log.Logger = new LoggerConfiguration()
    .WriteTo.BrowserConsole()
    .CreateLogger();

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

A more detailed example is available in this repository.

About

A console sink for the Blazor/Wasm environment

License:Apache License 2.0


Languages

Language:C# 81.0%Language:HTML 10.9%Language:CSS 4.9%Language:PowerShell 3.2%