Menu

SinkSharp: A Structured Logging Library for .NET, Built Around an Async Queue That Never Blocks Your Hot Path
📰

SinkSharp: A Structured Logging Library for .NET, Built Around an Async Queue That Never Blocks Your Hot Path

DEV Community: dotnet·Prabhu Siva·8 days ago
#7y4oK1DH
#devtodotnet#devto#dev#sinksharp#options
Long article (1195 words) — no AI summary yet.
Reading 0:00
15s threshold

Introduction

Most .NET apps log through Serilog or NLog today, and both are mature, battle-tested libraries. SinkSharp is a newer structured logging library for .NET, designed as a drop-in replacement for Serilog or NLog, built around one specific goal: make sure logging calls on your hot path never block, even when a sink (file, network, dashboard) is slow or temporarily down.

This post walks through what SinkSharp is, how its async pipeline works, and what you get out of the box: a real-time in-process dashboard, OpenTelemetry export, Slack/Teams alerting, PII masking, and config-driven log levels.

Getting started

dotnet add package SinkSharp.Core

Enter fullscreen mode

Exit fullscreen mode

A console app in five lines

using SinkSharp . Core ; using SinkSharp . Sinks . Console ;

var logger = SinkSharpBuilder . Create ( ) . WriteTo ( new ColoredConsoleSink ( ) ) . Build ( ) ;

logger .…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.