CDS.SQLiteLogging 2.5.16

dotnet add package CDS.SQLiteLogging --version 2.5.16
                    
NuGet\Install-Package CDS.SQLiteLogging -Version 2.5.16
                    
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="CDS.SQLiteLogging" Version="2.5.16" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CDS.SQLiteLogging" Version="2.5.16" />
                    
Directory.Packages.props
<PackageReference Include="CDS.SQLiteLogging" />
                    
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 CDS.SQLiteLogging --version 2.5.16
                    
#r "nuget: CDS.SQLiteLogging, 2.5.16"
                    
#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 CDS.SQLiteLogging@2.5.16
                    
#: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=CDS.SQLiteLogging&version=2.5.16
                    
Install as a Cake Addin
#tool nuget:?package=CDS.SQLiteLogging&version=2.5.16
                    
Install as a Cake Tool

CDS.SQLiteLogging

CDS.SQLiteLogging is a SQLite-backed logging library for .NET applications built on Microsoft.Extensions.Logging.

Supported frameworks

  • .NET 10 (net10.0)
  • .NET 8 (net8.0)
  • .NET Framework 4.8 (net48)

Features

  • SQLite-backed log storage with structured properties and scopes
  • Microsoft.Extensions.Logging provider for DI-based apps
  • Batching for efficient write throughput
  • Configurable housekeeping (retention period or max entry count)
  • Configurable SQLite PRAGMAs (journal mode / synchronous mode)

Installation

dotnet add package CDS.SQLiteLogging

Quick start

using CDS.SQLiteLogging.MEL;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;

var dbPath = Path.Combine(
    Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData),
    "CDS",
    "SQLiteLogging",
    "logs.db");

using var sqliteLoggerProvider = MELLoggerProvider.Create(dbPath);

using var serviceProvider = new ServiceCollection()
    .AddLogging(builder =>
    {
        builder.ClearProviders();
        builder.AddProvider(sqliteLoggerProvider);
        builder.SetMinimumLevel(LogLevel.Information);
    })
    .BuildServiceProvider();

var logger = serviceProvider.GetRequiredService<ILoggerFactory>()
    .CreateLogger("Demo");

logger.LogInformation("Hello from CDS.SQLiteLogging");

Configuration overview

BatchingOptions

  • BatchSize: max entries written per batch
  • MaxCacheSize: max in-memory queued entries
  • FlushInterval: periodic flush interval

HouseKeepingOptions

  • Mode: automatic or manual cleanup
  • RetentionPeriod: age-based cleanup threshold
  • CleanupInterval: cleanup timer interval
  • MaxEntries: count-based retention limit

DatabaseOptions

Defaults:

  • PRAGMA journal_mode = DELETE
  • PRAGMA synchronous = NORMAL

Both can be overridden with DatabaseOptions when creating the provider.

License

MIT — see LICENSE.

Attributions

<a href="https://www.flaticon.com/free-icons/log-file" title="log file icons">Log file icons created by Muhammad_Usman - Flaticon</a>

Product Compatible and additional computed target framework versions.
.NET 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 was computed.  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 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. 
.NET Framework net48 is compatible.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.5.16 42 5/15/2026
2.5.15 98 4/27/2026
2.5.13 114 3/25/2026
2.5.12 101 3/24/2026
2.5.11 94 3/24/2026
2.5.10 116 3/14/2026
2.5.9 105 3/14/2026
2.5.8 106 3/14/2026
2.5.7 110 3/11/2026
2.5.3 129 1/22/2026
2.2.2 228 10/9/2025
2.1.1 222 7/9/2025
2.0.5 209 6/24/2025
1.1.3 233 4/6/2025
1.0.27 372 4/4/2025
1.0.25 228 4/2/2025
1.0.17 229 4/1/2025
1.0.16 227 4/1/2025
1.0.14 227 4/1/2025