VanDerHeijden.Logging 10.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package VanDerHeijden.Logging --version 10.0.0
                    
NuGet\Install-Package VanDerHeijden.Logging -Version 10.0.0
                    
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="VanDerHeijden.Logging" Version="10.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="VanDerHeijden.Logging" Version="10.0.0" />
                    
Directory.Packages.props
<PackageReference Include="VanDerHeijden.Logging" />
                    
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 VanDerHeijden.Logging --version 10.0.0
                    
#r "nuget: VanDerHeijden.Logging, 10.0.0"
                    
#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.
#:package VanDerHeijden.Logging@10.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=VanDerHeijden.Logging&version=10.0.0
                    
Install as a Cake Addin
#tool nuget:?package=VanDerHeijden.Logging&version=10.0.0
                    
Install as a Cake Tool

VanDerHeijden.Logging

Core abstractions for high-performance batched logging in .NET 10.

What's in this package

  • IBatchedLogWriter<T> — implement this interface to create a custom log writer
  • BatchedLogger<T> — background consumer that batches entries and calls your writer
  • BatchedLoggerProvider<T>ILoggerProvider adapter for use with Microsoft.Extensions.Logging

This package contains no writer implementation. Install one of the writer packages instead:

Package Target
VanDerHeijden.Logging.File Daily rotating text files
VanDerHeijden.Logging.MongoDb MongoDB collection
VanDerHeijden.Logging.Sql SQL Server (SqlBulkCopy)
VanDerHeijden.Logging.Redis Redis list (RPUSH)

Implementing a custom writer

public sealed class MyWriter : IBatchedLogWriter<string>
{
    public async Task WriteBatchAsync(List<string> entries, CancellationToken ct)
    {
        // write entries to your target
    }

    public ValueTask DisposeAsync() => ValueTask.CompletedTask;
}

Register it:

builder.Logging.Services.AddSingleton<ILoggerProvider>(_ =>
{
    var writer = new MyWriter();
    var logger = new BatchedLogger<string>(writer, batchSize: 200, maxIdleMs: 4000);
    return new BatchedLoggerProvider<string>(logger, entryFactory: (msg, level) => msg);
});

Repository

https://github.com/alphons/VanDerHeijden.Logging

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  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 (4)

Showing the top 4 NuGet packages that depend on VanDerHeijden.Logging:

Package Downloads
VanDerHeijden.Logging.MongoDb

MongoDB log writer for VanDerHeijden.Logging: writes batched log entries to a MongoDB collection.

VanDerHeijden.Logging.Redis

Redis log writer for VanDerHeijden.Logging: writes batched log entries to a Redis list using RPUSH.

VanDerHeijden.Logging.File

File log writer for VanDerHeijden.Logging: writes batched log entries to daily rotating text files.

VanDerHeijden.Logging.Sql

SQL Server log writer for VanDerHeijden.Logging: writes batched log entries to a SQL Server table using SqlBulkCopy.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
10.0.8 78 5/13/2026
10.0.7 132 4/9/2026
10.0.6 153 3/11/2026
10.0.5 104 3/2/2026
10.0.4 136 2/23/2026
10.0.3 127 2/23/2026
10.0.2 127 2/23/2026
10.0.1 132 2/23/2026
10.0.0 132 2/22/2026