Pacem.Extensions.Logging.Http
0.10.12
See the version list below for details.
dotnet add package Pacem.Extensions.Logging.Http --version 0.10.12
NuGet\Install-Package Pacem.Extensions.Logging.Http -Version 0.10.12
<PackageReference Include="Pacem.Extensions.Logging.Http" Version="0.10.12" />
<PackageVersion Include="Pacem.Extensions.Logging.Http" Version="0.10.12" />
<PackageReference Include="Pacem.Extensions.Logging.Http" />
paket add Pacem.Extensions.Logging.Http --version 0.10.12
#r "nuget: Pacem.Extensions.Logging.Http, 0.10.12"
#:package Pacem.Extensions.Logging.Http@0.10.12
#addin nuget:?package=Pacem.Extensions.Logging.Http&version=0.10.12
#tool nuget:?package=Pacem.Extensions.Logging.Http&version=0.10.12
HTTP Logging Extensions
⚗️ ==Experimental==
⚠️ Experimental libs are discouraged to use in production.
About
Pacem.Extensions.Logging.Http provides extensions to ship your logs
to an HTTP endpoint (a webhook, a log-ingestion API, a collector, ...).
Delivery goes through IHttpClientFactory (a named client,
pacem.logger.http) and is performed by a background consumer, one entry
at a time, so logging calls never block on the network.
⚠️ The
IHttpClientFactorypipeline logs its own requests under theSystem.Net.Http.*categories. Left unfiltered those entries feed straight back into this sink and amplify without bound — scope the sink to the categories you actually care about (builder.AddFilter(...)or theFilteroption) or silenceSystem.Net.Http.
The following paragraphs exemplify the library utilization given common use cases.
How to
Add the relevant logger provider to the logging builder (e.g. ILoggingBuilder).
There are two ways to describe a delivery.
1. Converter mode — build the request, the sink sends it
Provide a HttpRequestLogPayload -> HttpRequestMessage converter. Use the
configureClient overload to set the base address, headers or timeout of the
named client.
// Program.cs
builder.Logging.AddPacemHttpLogging(
// log line -> request
log => new HttpRequestMessage(HttpMethod.Post, "/ingest")
{
Content = JsonContent.Create(new
{
timestamp = log.Timestamp,
source = log.Name,
level = log.LogLevel.ToString(),
message = log.Message,
error = log.Exception?.ToString(),
data = log.Data
})
},
client =>
{
client.BaseAddress = new Uri("https://logs.example.com");
client.DefaultRequestHeaders.Add("X-Api-Key", "…");
});
2. Executor mode — you own the send
Provide a (HttpClient, HttpRequestLogPayload) -> Task. Handy when you call an
SDK, batch differently, or need the response.
builder.Logging.AddPacemHttpLogging(
async (client, log) =>
{
using var response = await client.PostAsJsonAsync("/ingest", new
{
source = log.Name,
level = log.LogLevel.ToString(),
message = log.Message
});
response.EnsureSuccessStatusCode();
},
client => client.BaseAddress = new Uri("https://logs.example.com"));
A fourth overload takes a Func<IHttpClientFactory, HttpRequestLogPayload, HttpClient>
instead of an Action<HttpClient>, when you want to pick or build the client
per entry.
ℹ️ If neither a converter nor an executor is configured the provider throws on the first write.
Options
Every overload accepts an optional trailing Action<HttpLoggerOptions>:
| Option | Purpose |
|---|---|
FormatHttpRequestMessage |
The converter (set by the converter-mode overloads). |
SendHttpLogAsync |
The executor (set by the executor-mode overloads). |
CreateHttpClient |
Custom per-entry client selection from the IHttpClientFactory. |
Filter |
Func<HttpRequestLogPayload, bool> evaluated on the fully-built payload before it is queued. Return false to drop it. |
builder.Logging.AddPacemHttpLogging(
log => new HttpRequestMessage(HttpMethod.Post, "/ingest") { /* … */ },
client => client.BaseAddress = new Uri("https://logs.example.com"),
// don't ship our own transport noise back over HTTP
options => options.Filter = log => !log.Name.StartsWith("System.Net.Http"));
Plans for version next
Optional client-side batching and a retry / dead-letter policy.
| 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.Extensions.Http (>= 10.0.10)
- Pacem.Extensions.Logging (>= 0.10.12)
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.10.18-selberg | 32 | 10/1/2026 |
| 0.10.18-riemann | 84 | 9/26/2026 |
| 0.10.18-pascal | 90 | 9/21/2026 |
| 0.10.17 | 94 | 9/18/2026 |
| 0.10.17-foucault | 87 | 9/18/2026 |
| 0.10.16 | 87 | 9/16/2026 |
| 0.10.16-hamilton | 80 | 9/14/2026 |
| 0.10.16-gauss | 84 | 9/14/2026 |
| 0.10.16-faraday | 95 | 9/9/2026 |
| 0.10.15 | 95 | 9/7/2026 |
| 0.10.15-euler | 86 | 9/7/2026 |
| 0.10.14 | 102 | 9/6/2026 |
| 0.10.14-dedekind | 106 | 9/6/2026 |
| 0.10.14-cauchy | 101 | 9/5/2026 |
| 0.10.14-boltzmann | 93 | 9/5/2026 |
| 0.10.13 | 104 | 9/3/2026 |
| 0.10.13-abel | 92 | 9/3/2026 |
| 0.10.12 | 89 | 9/3/2026 |
| 0.10.11 | 99 | 8/26/2026 |
| 0.10.10 | 126 | 7/28/2026 |