CSharpEssentials.LoggerHelper 3.1.4

dotnet add package CSharpEssentials.LoggerHelper --version 3.1.4
                    
NuGet\Install-Package CSharpEssentials.LoggerHelper -Version 3.1.4
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="CSharpEssentials.LoggerHelper" Version="3.1.4" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CSharpEssentials.LoggerHelper" Version="3.1.4" />
                    
Directory.Packages.props
<PackageReference Include="CSharpEssentials.LoggerHelper" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add CSharpEssentials.LoggerHelper --version 3.1.4
                    
#r "nuget: CSharpEssentials.LoggerHelper, 3.1.4"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#addin nuget:?package=CSharpEssentials.LoggerHelper&version=3.1.4
                    
Install CSharpEssentials.LoggerHelper as a Cake Addin
#tool nuget:?package=CSharpEssentials.LoggerHelper&version=3.1.4
                    
Install CSharpEssentials.LoggerHelper as a Cake Tool

Frameworks CodeQL NuGet Downloads Last Commit Discussions [Issues(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
    Our TolerantPluginLoadContext 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‐new CurrentError 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 own ISinkPlugin 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:

  1. Dynamic Loading Revamped

    • Introduces TolerantPluginLoadContext—a custom AssemblyLoadContext 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.
  2. CurrentError & Full Error List

    • Capture and store the last exception message (Exception.Message) that occurred inside LoggerHelper via LoggerExtension<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.
  3. 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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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