CSharpEssentials.LoggerHelper is a modular, centralized hub for Serilog sinks that delivers comprehensive observability . Its flexible JSON‑based configuration lets you decide which log levels go to which sink—for example, routing only Error messages to email while sending all logs to ElasticSearch—without touching your code . The package unifies logs, metrics and traces via OpenTelemetry; every log entry carries a trace_id to correlate distributed requests, and an interactive dashboard lets you visualize traces, sink failures and telemetry, and configure alerts . Standard structured fields (e.g., IdTransaction, ApplicationName, MachineName, Action) are included by default, and you can enrich logs with custom properties that propagate across all sinks . Each sink—Console, File, MSSQL, PostgreSQL, ElasticSearch, Email, Telegram, xUnit, Telemetry, Dashboard and AI—is delivered as a separate NuGet package, so you install only what you need; the core loads them dynamically and exposes CurrentError and an in‑memory Errors queue to simplify debugging . The latest AI integration enables natural‑language queries against logs, trace correlation for root‑cause analysis, anomaly detection and automatic incident summaries , while the new xUnit sink captures full traces of failed tests directly in your test output—ideal for debugging flaky tests or disconnected environments
$ dotnet add package CSharpEssentials.LoggerHelper
The ultimate Serilog sink hub — extensible, modular, centralized.
A first version of the LoggerHelper Dashboard has been published!
🔎 What it provides:
CSharpEssentials.LoggerHelper is not just another logging library — it’s a smart hub for Serilog sinks.
Thanks to its modular architecture, you can plug in only the sinks you need.
Key strengths include:
Centralized & flexible configuration – Choose which sinks receive which log levels using appsettings.LoggerHelper.json. For example, send only Error messages to Email while routing all logs to ElasticSearch. No code changes required.
*- Unified observability & dashboard – The Sink.Telemetry package integrates logs, metrics and traces via OpenTelemetry. Each log entry carries a trace_id so you can correlate distributed requests. An interactive dashboard lets you visualize traces, sink errors and telemetry, and configure alerts.
Structured properties & enrichment – Standard fields like IdTransaction, ApplicationName, MachineName and Action are included by default. You can add custom properties (e.g., username, IP) with enricher functions, and they'll appear across all sinks.
Modular architecture & error inspection – Each sink (Console, File, MSSQL, PostgreSQL, ElasticSearch, Email, Telegram, xUnit, Telemetry) is a separate NuGet package. Install only what you need; the core loads them dynamically. It also exposes CurrentError and an in-memory Errors queue to help debug initialization failures.
🧠 Error Insight Built-In:
When something goes wrong, you can inspect:
CurrentError: the last exception messageErrors: the complete in-memory queue of failuresWhen running tests in environments like DevOps pipelines, DBs and external endpoints may not always be accessible.
No worries — with the xUnit sink, you get a full trace of failed tests directly inside your test output.
Just install the package and define your desired levels (Information, Warning, Error, etc.).
Perfect for debugging flaky tests or disconnected environments.
CSharpEssentials.LoggerHelper.Sink.ConsoleCSharpEssentials.LoggerHelper.Sink.FileCSharpEssentials.LoggerHelper.Sink.MSSqlServerCSharpEssentials.LoggerHelper.Sink.PostgreSqlCSharpEssentials.LoggerHelper.Sink.ElasticsearchCSharpEssentials.LoggerHelper.Sink.Telegram Used via HttpClientCSharpEssentials.LoggerHelper.Sink.EmailUsed via System.Net.MailCSharpEssentials.LoggerHelper.Sink.xUnit ✅ ( new from 3.1.5 )CSharpEssentials.LoggerHelper.Sink.Telemetry – CSharpEssentials.LoggerHelper.Sink.Telemetry collects logs, metrics and traces using OpenTelemetry.👉 Check out how to use the package in the documentation
📖 View the usage guide here!