CSharpEssentials.LoggerHelper
3.1.4
dotnet add package CSharpEssentials.LoggerHelper --version 3.1.4
NuGet\Install-Package CSharpEssentials.LoggerHelper -Version 3.1.4
<PackageReference Include="CSharpEssentials.LoggerHelper" Version="3.1.4" />
<PackageVersion Include="CSharpEssentials.LoggerHelper" Version="3.1.4" />
<PackageReference Include="CSharpEssentials.LoggerHelper" />
paket add CSharpEssentials.LoggerHelper --version 3.1.4
#r "nuget: CSharpEssentials.LoggerHelper, 3.1.4"
#addin nuget:?package=CSharpEssentials.LoggerHelper&version=3.1.4
#tool nuget:?package=CSharpEssentials.LoggerHelper&version=3.1.4
[
(https://github.com/alexbypa/CSharp.Essentials/issues)
📦 CSharpEssentials.LoggerHelper
What’s New in v3.1.4
🚦 ThrottleInterval Support (Telegram & Email Sinks)
Avoid flooding your notification channels!
The CSharpEssentials.LoggerHelper
sinks for Telegram and Email now support a brand new feature: ThrottleInterval.
✨ What is it?
ThrottleInterval
is a simple but powerful mechanism that prevents the same sink from sending messages too frequently.
It’s ideal for external services like Telegram bots or SMTP servers, which often have rate limits (e.g., HTTP 429 Too Many Requests).
🚀 Why CSharpEssentials.LoggerHelper?
🔌 Modular Architecture
Instead of bundling dozens of sinks into one monolithic library, each sink lives in its own NuGet sub‐package (e.g.,CSharpEssentials.LoggerHelper.Sink.File
,...Sink.MSSqlServer
, and so on). You install only what you need.⚡️ Dynamic Sink Loading
OurTolerantPluginLoadContext
ensures that sinks load “on the fly” at runtime without crashing your app—missing dependencies or version mismatches? No worries. Other sinks continue to work flawlessly.📄 Centralized Configuration
Manage all your sinks and log‐levels in a single JSON file (appsettings.LoggerHelper.json
). Clean, intuitive, and flexible.🛠️ “CurrentError” Error Tracking
A brand‐newCurrentError
static property captures the last exception thrown inside the library. Perfect for production scenarios where you want to expose the most recent failure (for example, inserting it into an HTTP header) :
if (!string.IsNullOrEmpty(loggerExtension<ProviderRequest>.CurrentError))
HttpContext.Response.Headers["loggerExtension.CurrentError"] = loggerExtension<ProviderRequest>.CurrentError;
📈 Structured, Level‐Based Routing
Direct logs to one or many sinks based on level (Information
,Warning
,Error
, etc.). You decide what goes where—and it’s easy to change on the fly.🔀 Infinite Extensibility
Write your ownISinkPlugin
implementations, drop them in a folder, and CSharpEssentials.LoggerHelper will discover and register them automatically.💡 SelfLog Support
Serilog’s internal SelfLog writes to a file you specify so you never miss a diagnostic message if something goes wrong in your logging pipeline.
🆕 What’s New in v3.1.1
Version 3.1.1 is a major milestone! Highlights:
Dynamic Loading Revamped
- Introduces
TolerantPluginLoadContext
—a customAssemblyLoadContext
that quietly ignores missing dependencies. - No more “Could not load assembly” exceptions when a plugin references a missing formatter or helper library. Other sinks keep on working smoothly.
- Introduces
CurrentError
& Full Error List- Capture and store the last exception message (
Exception.Message
) that occurred inside LoggerHelper viaLoggerExtension<YourContext>.CurrentError
. - Roadmap: we will surface all initialization errors in a dedicated dashboard (
CSharpEssentials.LoggerHelper.Dashboard
), so you can see both the single “last” failure and the complete list of errors in one place.
- Capture and store the last exception message (
Quality‐of‐Life Improvements
- Updated to support .NET 8.0 (and .NET 6.0).
- Minor bug fixes, performance optimizations, and improved documentation links.
NOTE: If you currently reference older versions of Serilog sinks in your project, double‐check the Known Issues section below before upgrading.
Available Sink Packages
- Console:
CSharpEssentials.LoggerHelper.Sink.Console
- File:
CSharpEssentials.LoggerHelper.Sink.File
- MSSqlServer:
CSharpEssentials.LoggerHelper.Sink.MSSqlServer
- PostgreSQL:
CSharpEssentials.LoggerHelper.Sink.PostgreSql
- ElasticSearch:
CSharpEssentials.LoggerHelper.Sink.Elasticsearch
- Telegram:
Used via HttpClient
- Email:
Used via System.Net.Mail
🚀 Basic Usage
👉 Check out how to use the package in the documentation
📖 View the usage guide here!
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net6.0
- Microsoft.Extensions.Configuration (>= 9.0.4)
- Microsoft.Extensions.Configuration.Binder (>= 9.0.1)
- Microsoft.Extensions.Configuration.Json (>= 9.0.1)
- Serilog (>= 4.2.0)
- Serilog.Settings.Configuration (>= 9.0.0)
- System.Diagnostics.DiagnosticSource (>= 9.0.4)
-
net8.0
- Microsoft.Extensions.Configuration (>= 9.0.4)
- Microsoft.Extensions.Configuration.Binder (>= 9.0.1)
- Microsoft.Extensions.Configuration.Json (>= 9.0.1)
- Serilog (>= 4.2.0)
- Serilog.Settings.Configuration (>= 9.0.0)
- System.Diagnostics.DiagnosticSource (>= 9.0.4)
-
net9.0
- Microsoft.Extensions.Configuration (>= 9.0.4)
- Microsoft.Extensions.Configuration.Binder (>= 9.0.1)
- Microsoft.Extensions.Configuration.Json (>= 9.0.1)
- Serilog (>= 4.2.0)
- Serilog.Settings.Configuration (>= 9.0.0)
- System.Diagnostics.DiagnosticSource (>= 9.0.4)
NuGet packages (7)
Showing the top 5 NuGet packages that depend on CSharpEssentials.LoggerHelper:
Package | Downloads |
---|---|
CSharpEssentials.LoggerHelper.Sink.Elasticsearch
Sink ElasticSearch for CSharpEssentials.LoggerHelper |
|
CSharpEssentials.LoggerHelper.Sink.Postgresql
Package Description |
|
CSharpEssentials.LoggerHelper.Sink.File
Sink File for package LoggerHelper |
|
CSharpEssentials.LoggerHelper.Sink.MSSqlServer
Package Description |
|
CSharpEssentials.LoggerHelper.Sink.Console
Package Description |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
3.1.4 | 7 | 6/12/2025 |
3.1.3 | 49 | 6/11/2025 |
3.1.2 | 54 | 6/9/2025 |
3.1.1 | 209 | 6/8/2025 |
3.1.0 | 51 | 6/8/2025 |
3.0.6 | 133 | 6/5/2025 |
3.0.5 | 125 | 6/5/2025 |
3.0.4 | 122 | 6/2/2025 |
3.0.3 | 124 | 6/2/2025 |
3.0.2 | 332 | 6/1/2025 |
3.0.1 | 130 | 5/30/2025 |
3.0.0 | 140 | 5/30/2025 |
2.0.9 | 60 | 5/24/2025 |
2.0.8 | 95 | 5/23/2025 |
2.0.7 | 95 | 5/23/2025 |
2.0.6 | 128 | 5/19/2025 |
2.0.5 | 212 | 5/14/2025 |
2.0.4 | 238 | 5/13/2025 |
2.0.1 | 120 | 5/11/2025 |
2.0.0 | 121 | 5/11/2025 |
1.3.1 | 123 | 5/11/2025 |
1.2.3 | 70 | 5/10/2025 |
1.2.2 | 58 | 5/10/2025 |
1.2.1 | 103 | 5/9/2025 |
1.1.6 | 132 | 5/6/2025 |
1.1.5 | 151 | 5/5/2025 |
1.1.4 | 137 | 5/4/2025 |
1.1.3 | 140 | 5/4/2025 |
1.1.2 | 140 | 5/4/2025 |
1.1.1 | 132 | 5/4/2025 |
1.0.1 | 109 | 2/19/2025 |
1.0.0 | 94 | 2/19/2025 |