Rask.Logging
0.20.0
See the version list below for details.
dotnet add package Rask.Logging --version 0.20.0
NuGet\Install-Package Rask.Logging -Version 0.20.0
<PackageReference Include="Rask.Logging" Version="0.20.0" />
<PackageVersion Include="Rask.Logging" Version="0.20.0" />
<PackageReference Include="Rask.Logging" />
paket add Rask.Logging --version 0.20.0
#r "nuget: Rask.Logging, 0.20.0"
#:package Rask.Logging@0.20.0
#addin nuget:?package=Rask.Logging&version=0.20.0
#tool nuget:?package=Rask.Logging&version=0.20.0
Rask.Logging
A durable log store for a Rask app — kept in a SQLite file of its own, with no agent and no hosted log service. What happened survives the restart that hid it.
- Registers a standard
ILoggerProvider, so it captures exactly what every other sink sees — your own categories and the framework's (Rask.Live,Rask.Lifecycle,Rask.Diff, …) — with no wiring at the call sites. - Log calls never wait on the disk. Entries go into a bounded in-memory buffer and a background writer flushes them in batches; when the buffer is full an entry is dropped and counted, never queued unbounded and never blocked on.
- Retention by age and by row count, swept in short pages so the write lock is never held for a whole sweep. Both are on by default: age alone doesn't bound the disk when an app gets chatty.
- Queryable — filter by level, category, text, and time range, with paging.
Rask.Dashboard's Logs page reads it directly.
Use
// Program.cs
builder.Services.AddRaskLogging(
builder.Configuration.GetConnectionString("Logs") ?? "Data Source=logs.db");
That is the whole setup — the schema is created on first use, so there is no migration to add.
builder.Services.AddRaskLogging(connectionString, o =>
{
o.MinimumLevel = LogLevel.Warning; // a floor, not an override (see below)
o.Retention = TimeSpan.FromDays(30);
o.MaxRows = 250_000; // the backstop against a log storm
});
// Read it back from your own code.
var page = await store.QueryAsync(new LogQuery
{
MinimumLevel = LogLevel.Error,
Search = "checkout",
From = DateTimeOffset.UtcNow.AddHours(-6),
});
MinimumLevel is a floor, not an override: the logging pipeline applies your Logging:LogLevel
configuration first, so an entry filtered there never reaches the store however low you set it.
Its own file, on purpose. Unlike the other database-backed pillars this one does not map onto your
DbContext. Log lines arrive at machine rates, and the line you most want is the one written while a transaction is failing — on the app's context it would roll back with the failure. The trade-off: the log file is not covered byrask db backupor Litestream, and log lines can contain secrets, so treat it as sensitive and put it on the same persistent volume as your database.
Watch rask.logs.dropped on the Rask.Logging meter. A non-zero drop rate is the only thing that will
tell you the log you are reading is incomplete.
| Product | Versions 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. |
-
net10.0
- Microsoft.Data.Sqlite (>= 10.0.10)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.10)
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.10)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.10)
- Rask.SQLite (>= 0.20.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Rask.Logging:
| Package | Downloads |
|---|---|
|
Rask.Dashboard
A built-in operator dashboard for the Rask One Person Framework batteries. Mounts at /_rask and shows the outbox, background jobs, queued mail and cache from the application's own database — queue depth, dead letters, the errors behind them, stored email previews, the recurring-job schedule, SQLite pragmas and backup status. A live log tail is built in, and becomes a searchable history when Rask.Logging is installed. Panels appear only for the batteries the app actually registered. Protected by an authorization policy that fails closed outside Development. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.20.1-alpha.0.103 | 0 | 8/19/2026 |
| 0.20.1-alpha.0.102 | 0 | 8/19/2026 |
| 0.20.1-alpha.0.101 | 0 | 8/19/2026 |
| 0.20.1-alpha.0.100 | 0 | 8/19/2026 |
| 0.20.1-alpha.0.98 | 0 | 8/19/2026 |
| 0.20.1-alpha.0.97 | 0 | 8/19/2026 |
| 0.20.1-alpha.0.96 | 0 | 8/19/2026 |
| 0.20.1-alpha.0.94 | 0 | 8/19/2026 |
| 0.20.1-alpha.0.93 | 28 | 8/18/2026 |
| 0.20.1-alpha.0.88 | 29 | 8/18/2026 |
| 0.20.1-alpha.0.87 | 22 | 8/18/2026 |
| 0.20.1-alpha.0.86 | 30 | 8/18/2026 |
| 0.20.1-alpha.0.83 | 25 | 8/18/2026 |
| 0.20.1-alpha.0.82 | 29 | 8/18/2026 |
| 0.20.1-alpha.0.81 | 28 | 8/18/2026 |
| 0.20.1-alpha.0.79 | 31 | 8/18/2026 |
| 0.20.1-alpha.0.78 | 35 | 8/18/2026 |
| 0.20.1-alpha.0.77 | 24 | 8/18/2026 |
| 0.20.1-alpha.0.76 | 31 | 8/18/2026 |
| 0.20.0 | 371 | 8/6/2026 |