⚡ Core v1.0.10 · OTel v1.0.1 · Dashboard v1.1.0 · Dashboard.Redis v1.0.0 · Slack v1.0.0 · Teams v1.0.0 — Stable on NuGet

The intelligent logger
for C# architects

Deep, structured, seamless. SinkSharp gives your .NET services fast async logging with built-in PII masking, correlation propagation, and a real-time local dashboard — included free, no separate licence.

dotnet add package SinkSharp.Core
Apache 2.0 licencenet9.0 MEL-compatibleILogger drop-inZero config
~850ns
Hot path per Log() call
341B
Allocation — 3 properties
3.2×
Faster than Serilog
~0 vs 1,575
Lock contentions (4 threads)
Apache 2.0
Free forever
Why SinkSharp
Precision. Intelligence. Seamless.
Built for .NET engineers who need production-grade logging without configuration overhead or licence overhead.
Fast async hot path
Async bounded channel queue. Your threads enqueue in ~850ns (includes enrichment) and return immediately — formatting and sink writes happen on a dedicated background thread. Caller never blocks, even with a slow sink.
Built-in PII masking
Regex-based masking for emails, credit cards, SSNs, and phone numbers runs before any sink writes. Zero sensitive data reaches your log files.
Correlation propagation
AsyncLocal context carries the correlation ID across every await boundary. Web API: one line (app.UseSinkSharp()) reads the header and tags every log automatically. Worker Service / Console: call CorrelationContext.Use(id) per job.
Local dashboard — free
Real-time log stream via SignalR, level filters, correlation trace, full-text search. Web API: mounts on your existing host and port — no extra process. Worker / Console: standalone Kestrel on port 5341. Included free — no separate licence required.
Health check built in
One line to register with ASP.NET Core's health system. Reports Healthy / Degraded / Unhealthy based on drop rate and queue pressure.
Azure-native enricher
Reads App Service and AKS environment variables once at startup — zero runtime cost per event. Stamps region, resource group, slot name, subscription ID, and pod name on every log event. Available as a separate package: SinkSharp.Enrichers.Azure.
How SinkSharp compares — vs Serilog
FeatureSerilogSinkSharp
MEL-compatible ILogger✓✓
Built-in PII masking✗✓
Correlation ID auto-propagationManual✓ Auto via AsyncLocal
Azure resource contextPlugin✓ Built-in
Local web dashboardSeparate tool required✓ Included free
Built-in health check✗✓
Hot path allocation (3 props, benchmarked)473 B341 B
Hot path latency (benchmarked)2,672 ns843 ns
LicenceApache 2.0Apache 2.0
Documentation
Everything in one place
From five-minute quick start to advanced custom sinks — structured for every level.
NuGet packages
Install only what you need
Start with Core — add sinks and enrichers as you grow.
SinkSharp.Core
The foundation — pipeline, builder, MEL integration, health check. Required by all other packages.
✓ v1.0.10 stable
SinkSharp.Sinks.Console
Colored, grouped console output with level badges, service names, and correlation IDs.
✓ v1.0.1 stable
SinkSharp.Sinks.File
Rolling daily JSONL files. Each line is valid JSON — easy to import into Elasticsearch or Azure Monitor.
✓ v1.0.2 stable
SinkSharp.Sinks.Dashboard
Embedded real-time log dashboard with SignalR streaming, pluggable history, "Load older" paging, and a /health endpoint for the history store — independent of whether a dashboard tab is open. Free, included with SinkSharp.
✓ v1.1.0 stable
SinkSharp.Sinks.Dashboard.Redis
Optional add-on: keeps dashboard history in a Redis Stream, shared across every pod and preserved across restarts and deployments. Non-blocking writes — a Redis outage costs history, not logging.
✓ v1.0.0 stable
SinkSharp.Sinks.Slack
Push alerting via a Slack Incoming Webhook — no OAuth app, no bot token. Block Kit formatted: level badge, message, category/timestamp/correlation fields, exception as a code block.
✓ v1.0.0 stable
SinkSharp.Sinks.MicrosoftTeams
Push alerting as an Adaptive Card via a Teams channel Workflow webhook — the current replacement for the retired Office 365 Connector. Same fields as the Slack sink.
✓ v1.0.0 stable
SinkSharp.Enrichers.Azure
Azure App Service and AKS context at zero runtime cost. Region, resource group, pod name on every event.
✓ v1.0.0 stable
SinkSharp.Sinks.OpenTelemetry
OTLP log export + distributed tracing. Ship enriched, PII-masked logs to Jaeger, Grafana Loki, Datadog, New Relic, and Azure Monitor with one package and a single config object.
✓ v1.0.1 stable
Benchmarks
Real numbers. Reproducible.
.NET 9.0.20 · Windows 11 · X64 RyuJIT AVX2 · BenchmarkDotNet 0.14.0
Run yourself: dotnet run -c Release --project benchmarks/SinkSharp.Benchmarks
Test conditions: Single producer thread for hot-path and allocation benchmarks (1,024 invocations × 10 iterations, 3 warm-up). Concurrent producer benchmarks use pre-created threads (1 / 4 / 8 / 16 / 32 threads × 1,000 events each). All benchmarks use a NullSink (in-memory, no I/O) to isolate queue and pipeline cost. Serilog comparison uses its buffered file sink (async, closest equivalent to SinkSharp's async queue). Machine: Windows 11, Unknown processor, .NET 9.0.20, X64 RyuJIT AVX2, BenchmarkDotNet v0.14.0. Results are indicative — ratios between SinkSharp and Serilog are more meaningful than absolute numbers on your hardware.
Hot path — caller-side latency per Log() call
MethodMeanAllocatedvs Serilog
Disabled (IsEnabled fast-exit)6 ns0 B—
SinkSharp — no enrichers843 ns266 B3.2× faster
SinkSharp — all enrichers (PII + Corr + Env)795 ns387 B3.4× faster
SinkSharp — Error (critical channel)835 ns381 B3.2× faster
Serilog buffered file2,672 ns401 Bbaseline
Allocation per call
PropertiesSinkSharpSerilogDifference
0 properties80 B161 B50% less
1 property299 B361 B17% less
3 properties341 B473 B28% less
Concurrent producers — N threads × 1,000 logs
ProducersSinkSharpSerilogFasterLock contentions
1713 µs3,008 µs4.2×0 vs 0
43,098 µs4,682 µs1.5×0 vs 55
86,657 µs8,747 µs1.3×0.2 vs 113
1614,215 µs17,230 µs1.2×0.75 vs 351
3234,794 µs35,215 µs~parity1.2 vs 724
P99 latency — mixed load (80% Info / 15% Warn / 5% Error)
MeanP95Max observed
SinkSharp1.33 µs1.82 µs2.02 µs
Serilog2.82 µs3.70 µs4.05 µs
Backpressure isolation — caller latency regardless of sink speed
SinkCaller latencyWhat this proves
NullSink (instant)1,136 nsBaseline enqueue cost
SlowSink (10 ms per event)715 nsCaller NOT blocked — slow sink runs on background thread
End-to-end durability — Enqueued == Processed
SinkProducersDrain timeVerifiedDropped
NullSink12.5 ms✅ True0
NullSink88 ms✅ True0
NullSink3231 ms✅ True0
500µs CPU sink1512 ms✅ True0
500µs CPU sink81,187 ms✅ True0
500µs CPU sink322,891 ms✅ True0
1ms accurate sink11,005 ms✅ True0
1ms accurate sink82,413 ms✅ True0
1ms accurate sink325,634 ms✅ True0

All enqueued events processed — zero dropped across all producer counts and sink types.

Roadmap
What's next
SinkSharp is production-ready at v1.0. Future versions focus on broader sink coverage and smarter queuing.
RELEASED v1.0.10 Core · v1.0.1 OTel · v1.1.0 Dashboard · v1.0.0 Dashboard.Redis · v1.0.0 Slack · v1.0.0 Teams
  • ✅ Striped async channel queue
  • ✅ MEL ILogger<T> compatible
  • ✅ PII masking enricher
  • ✅ Correlation ID propagation
  • ✅ Console + File + Dashboard sinks
  • ✅ Azure context enricher
  • ✅ ASP.NET Core health check
  • ✅ Dashboard stable — 6 auth modes
  • ✅ Bearer JWT live streaming fix
  • ✅ Redis multi-pod backplane
  • ✅ IP allowlist + Basic auth
  • ✅ Idempotent DisposeAsync
  • ✅ Per-sink minimum level overrides
  • ✅ app.UseSinkSharp() correlation middleware
  • ✅ WithRequestId() + WithUserContext() enrichers
  • ✅ WithUserContext(claims:[...]) — custom JWT claim types (v1.0.9)
  • ✅ Pluggable sampling — .WithSampling() (v1.0.9)
  • ✅ Dashboard: log event bookmarking / pinning (v1.0.5)
  • ✅ Dashboard: structured property filter UI (v1.0.5)
  • ✅ Dashboard: copy correlation ID to clipboard
  • ✅ Dashboard: shareable URL with active filters
  • ✅ WithMachineName(), WithRequestPath(), WithElapsedTime() enrichers
  • ✅ .Filter() — structured event filter, zero alloc for dropped events
  • ✅ .WithEnricher(when:) — conditional enrichment
  • ✅ SetGlobalLevel() — runtime level change without restart
  • ✅ Dashboard: regex search, CSV export, reconnect indicator, buffer capacity
  • ✅ SinkSharp.Sinks.OpenTelemetry v1.0.1 — OTLP export to Jaeger, Grafana Loki, Datadog, New Relic, Azure Monitor
  • ✅ Core v1.0.10 — dependency updates (Microsoft.Extensions.* 10.0.15)
  • ✅ Dashboard v1.1.0 — pluggable history store (IDashboardHistoryStore), "Load older" paging, GET /health + AddSinkSharpDashboardHealthCheck(), auto catch-up polling while degraded, non-blocking live stream
  • ✅ SinkSharp.Sinks.Dashboard.Redis v1.0.0 — Redis Streams history shared across pods and preserved across restarts; non-blocking writes with retry back-off
  • ✅ SinkSharp.Sinks.Slack v1.0.0 + SinkSharp.Sinks.MicrosoftTeams v1.0.0 — push alerting via Incoming Webhook / Adaptive Card; pair with a per-sink minimum level for Error/Critical-only notifications
NEXT v1.1
  • 🔲 SinkSharp.Sinks.Kafka — publish the log stream to a Kafka topic for downstream consumers
  • 🔲 SinkSharp.Sinks.NATS — publish the log stream over NATS / JetStream
  • 🔲 Alert rules + webhooks — threshold-based notifications (error rate, queue drops) on top of the Slack/Teams sinks
  • 🔲 SinkSharp.Enrichers.AWS — EC2, ECS, Lambda context enricher
  • 🔲 ArrayPool<byte> in OtlpProto — zero-alloc Protobuf serialiser
  • 🔲 Dashboard: structured property filter (persist across sessions)
  • 🔲 Configurable batch size for the drain loop (parallel fan-out to multiple remote sinks)
FUTURE v2.0
  • 🔲 SinkSharp.Sinks.AzureMonitor — direct Application Insights, CorrelationId → operation_Id
  • 🔲 SinkSharp.Sinks.AzureEventHub — batch events into Event Hub partitions
  • 🔲 SinkSharp.Enrichers.EntityFramework — stamps the SQL query executing when a log line is written
  • 🔲 Log event deduplication — collapse repeats during an exception storm into a periodic summary
  • 🔲 SinkSharp.AI — natural language log querying from buffered events (Claude API)
  • 🔲 ArrayPool<byte> zero-alloc pipeline (v2.0 perf milestone)

Start logging with precision today

Free forever. Apache 2.0 licence. No Docker, no separate process, no overhead.
📦 Samples  ·  ✉ support@sinksharp.com  ·  ⭐ GitHub

Read the docs →
dotnet add package SinkSharp.Core
About SinkSharp
The modern .NET logging library built for production
Serilog alternative for .NET 9 SinkSharp is a structured logging library for C# and .NET 9 that outperforms Serilog by 3× on the hot path (single-threaded, NullSink baseline, measured with BenchmarkDotNet on .NET 9.0.20). It is fully compatible with Microsoft.Extensions.Logging (MEL) and works as a drop-in ILogger replacement — no code changes needed in your ASP.NET Core, Worker Service, or Console app.
Built-in PII masking for .NET logs Unlike Serilog, SinkSharp includes automatic PII masking out of the box. Emails, credit card numbers, SSNs, and phone numbers are redacted before any sink writes — making compliance with GDPR and data protection requirements straightforward for .NET applications.
Free built-in log dashboard SinkSharp ships with a free embedded real-time log dashboard at localhost:5341. It streams live log events via SignalR, supports level filtering, full-text search, and correlation ID tracing. No separate log viewer licence required.
High-performance logging for C# architects Using an async bounded channel queue, SinkSharp enqueues log events in ~850ns on the caller thread (includes enrichment and enqueue). Enrichment, formatting, and sink writes happen on a dedicated background thread — keeping allocation at 80B with zero properties. Lock contentions near-zero vs 1,575 for Serilog at 4 concurrent threads (ConcurrentThroughputBenchmark, pre-created threads × 1,000 events each).
SinkSharp NuGet packages: SinkSharp.Core · SinkSharp.Sinks.Console · SinkSharp.Sinks.File · SinkSharp.Sinks.Dashboard · SinkSharp.Enrichers.Azure · SinkSharp.Sinks.OpenTelemetry
Blog
From the SinkSharp team
Deep dives into .NET logging, performance, compliance, and structured diagnostics.
View all posts →