Logaffe.Extensions.Logging
0.4.0
See the version list below for details.
dotnet add package Logaffe.Extensions.Logging --version 0.4.0
NuGet\Install-Package Logaffe.Extensions.Logging -Version 0.4.0
<PackageReference Include="Logaffe.Extensions.Logging" Version="0.4.0" />
<PackageVersion Include="Logaffe.Extensions.Logging" Version="0.4.0" />
<PackageReference Include="Logaffe.Extensions.Logging" />
paket add Logaffe.Extensions.Logging --version 0.4.0
#r "nuget: Logaffe.Extensions.Logging, 0.4.0"
#:package Logaffe.Extensions.Logging@0.4.0
#addin nuget:?package=Logaffe.Extensions.Logging&version=0.4.0
#tool nuget:?package=Logaffe.Extensions.Logging&version=0.4.0
Logaffe.Extensions.Logging
An ILoggerProvider that delivers to a
logaffe installation — a
self-hostable, central logging tool for a single operator and their AI agent.
For applications on Microsoft.Extensions.Logging rather than Serilog. It
builds CLEF from ILogger's message template and
state, so nothing about how the application already logs has to change.
Use
var builder = WebApplication.CreateBuilder(args);
builder.Logging.AddLogaffe(
new Uri("https://logs.example.com"),
builder.Configuration["Logaffe:IngestToken"]!);
The console provider stays where it is. logaffe is additive — it does not replace the log the application already writes, and that is what makes a lost delivery affordable.
A delivery never names a project: the token is the project. The address is scheme and host as the operator reaches the installation — the ingest path is appended and is not a setting.
Everything else
builder.Logging.AddLogaffe(options =>
{
options.Installation = new Uri("https://logs.example.com");
options.IngestToken = builder.Configuration["Logaffe:IngestToken"]!;
options.Instance = Environment.GetEnvironmentVariable("HOSTNAME");
options.IncludeScopes = true;
});
| default | ||
|---|---|---|
Instance |
Environment.MachineName |
what separates three replicas of one service; null leaves it off |
IncludeScopes |
false |
carry scope state as properties |
QueueCapacity |
10_000 |
oldest dropped when full |
BatchInterval |
1s |
how long the first entry waits for company |
FlushTimeout |
5s |
how long shutdown keeps trying |
DeliveryTimeout |
10s |
how long one request may take |
OnFailure |
Console.Error |
(message, exception) — where problems are reported |
Your own HttpClient
builder.Logging.AddLogaffe(options => { … }, httpClient);
The client stays yours and is not disposed with the provider. Take this overload
rather than constructing LogaffeLoggerProvider yourself and calling
AddProvider — a container never disposes what it did not create, and that
disposal is the flush.
Each call adds one sender. Two calls are two installations, each with its own token, queue and flush.
The application's own filters apply first. This is a provider like any
other, so LogLevel configuration and category filters decide what reaches it;
there is no second filter to keep in step.
What it promises
Fire-and-forget. A bounded in-memory queue, dropping the oldest entries when full; never throwing into the calling application and never blocking it; a flush with a timeout on shutdown. An unbounded queue would turn a logging outage into an application outage, which is the thing this exists to prevent.
The host disposes it, which is what flushes it. The provider is registered
as a factory rather than a ready-made instance, because a container never
disposes an object it did not create — and without that disposal the flush never
runs and an application's last entries never leave. Every AddLogaffe overload
registers one, the one taking an HttpClient included.
Nothing is guaranteed to arrive. No durable buffer, no retry outliving the
process. The application still has its own log, which is where a failed delivery
is reported through OnFailure.
What logaffe does with what you send
The server renders the template. The message template and the properties are stored, not a pre-rendered string, and only those placeholders are substituted for which a property of the same name arrived — everything else stays character for character, because log content is untrusted.
Levels map without loss. Trace is logaffe's Verbose, Critical is
Fatal, and the four in between are identical. Both spellings are accepted.
instance, SourceContext, TraceId and SpanId are promoted to indexed
fields when present, and this package fills all four for you: the logger
category arrives as SourceContext, which makes cutting framework noise a
one-click filter, and the trace and span are taken from Activity.Current — so
an entry correlates with the request it belongs to without the application
passing anything.
Exceptions land in @x as text, stored as delivered and never parsed.
Full detail: docs/ingestion.md.
Requirements
.NET 8 or later. MIT licensed.
| 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 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. |
-
net8.0
- Logaffe.Client (>= 0.4.0)
- Microsoft.Extensions.Logging.Abstractions (>= 8.0.3)
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 |
|---|---|---|
| 0.9.0 | 88 | 9/6/2026 |
| 0.8.0 | 93 | 9/6/2026 |
| 0.7.1 | 102 | 9/6/2026 |
| 0.7.0 | 93 | 9/6/2026 |
| 0.6.0 | 109 | 8/23/2026 |
| 0.5.0 | 236 | 8/23/2026 |
| 0.4.0 | 108 | 8/20/2026 |
| 0.3.0 | 103 | 8/19/2026 |
| 0.2.8 | 99 | 8/19/2026 |
| 0.2.7 | 95 | 8/19/2026 |
| 0.2.6 | 93 | 8/19/2026 |
| 0.2.5 | 104 | 8/19/2026 |
| 0.2.4 | 123 | 8/19/2026 |
| 0.2.3 | 100 | 8/19/2026 |
| 0.2.2 | 103 | 8/18/2026 |
| 0.2.1 | 103 | 8/17/2026 |
| 0.2.0 | 107 | 8/17/2026 |
| 0.1.1 | 109 | 8/13/2026 |
| 0.1.0 | 98 | 8/13/2026 |
| 0.1.0-alpha.1 | 62 | 8/13/2026 |