CDS.SQLiteLogging
2.5.16
.NET 8.0
This package targets .NET 8.0. The package is compatible with this framework or higher.
.NET Framework 4.8
This package targets .NET Framework 4.8. The package is compatible with this framework or higher.
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" />
<PackageReference Include="CDS.SQLiteLogging" />
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
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#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
#tool nuget:?package=CDS.SQLiteLogging&version=2.5.16
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
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.Loggingprovider 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 batchMaxCacheSize: max in-memory queued entriesFlushInterval: periodic flush interval
HouseKeepingOptions
Mode: automatic or manual cleanupRetentionPeriod: age-based cleanup thresholdCleanupInterval: cleanup timer intervalMaxEntries: count-based retention limit
DatabaseOptions
Defaults:
PRAGMA journal_mode = DELETEPRAGMA synchronous = NORMAL
Both can be overridden with DatabaseOptions when creating the provider.
Links
- Source / issues: https://github.com/nooogle/CDS.SQLiteLogging
- NuGet package: https://www.nuget.org/packages/CDS.SQLiteLogging
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 | Versions 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.
-
.NETFramework 4.8
- Microsoft.Extensions.DependencyInjection (>= 10.0.7)
- Microsoft.Extensions.Logging (>= 10.0.7)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.7)
- Newtonsoft.Json (>= 13.0.4)
- System.Collections.Immutable (>= 10.0.7)
- System.Data.SQLite (>= 2.0.3)
-
net10.0
- Microsoft.Data.Sqlite (>= 10.0.7)
- Microsoft.Extensions.DependencyInjection (>= 10.0.7)
- Microsoft.Extensions.Logging (>= 10.0.7)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.7)
- Newtonsoft.Json (>= 13.0.4)
-
net8.0
- Microsoft.Data.Sqlite (>= 10.0.7)
- Microsoft.Extensions.DependencyInjection (>= 10.0.7)
- Microsoft.Extensions.Logging (>= 10.0.7)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.7)
- Newtonsoft.Json (>= 13.0.4)
- System.Collections.Immutable (>= 10.0.7)
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 |