Franz.Common.Logging
3.0.0
dotnet add package Franz.Common.Logging --version 3.0.0
NuGet\Install-Package Franz.Common.Logging -Version 3.0.0
<PackageReference Include="Franz.Common.Logging" Version="3.0.0" />
<PackageVersion Include="Franz.Common.Logging" Version="3.0.0" />
<PackageReference Include="Franz.Common.Logging" />
paket add Franz.Common.Logging --version 3.0.0
#r "nuget: Franz.Common.Logging, 3.0.0"
#:package Franz.Common.Logging@3.0.0
#addin nuget:?package=Franz.Common.Logging&version=3.0.0
#tool nuget:?package=Franz.Common.Logging&version=3.0.0
Franz.Common.Logging
Serilog host-builder integration with environment-specific sinks, enrichment, and framework-noise filters.
Overview
Serilog host-builder integration with environment-specific sinks, enrichment, and framework-noise filters.
Installation
dotnet add package Franz.Common.Logging
Host-builder extensions
The package exposes three extensions in Franz.Common.Logging.Extensions.
UseLog
using Franz.Common.Logging.Extensions;
var host = Host.CreateDefaultBuilder(args)
.UseLog()
.Build();
await host.RunAsync();
UseLog() configures Serilog from host configuration and registered services, enriches events with log context, application name, machine name, and environment name, and applies the package's baseline source filters.
- Development: Debug minimum level, console and debug sinks, and daily rolling
logs/dev-.logfiles with a retained-file limit of 10. - Non-development: Information minimum level, console output, daily JSON
logs/prod-sre-.jsonand human-readablelogs/prod-dev-.logfiles.
The extension configures UTF-8 console encoding and invokes TraceHelper.LogConsole(). Elastic APM agent setup is compiled only in DEBUG builds; it is not an unconditional production APM registration.
UseDesktopLog
var host = Host.CreateDefaultBuilder(args)
.UseDesktopLog()
.Build();
This uses a desktop-oriented template with thread ID enrichment, console/debug sinks, and daily rolling logs/desktop-.log files. It does not add request ID or request path fields to the output template.
UseHybridLog
var host = Host.CreateDefaultBuilder(args)
.UseHybridLog()
.Build();
This applies baseline filters, reads Serilog configuration, enriches from log context, application name, and machine name. It does not add the explicit console/file sinks used by UseLog or UseDesktopLog; configure sinks through host Serilog configuration.
Filtering and enrichment
The baseline configuration excludes selected low-value framework sources, including EF Core internals, HttpClient, Data Protection, static files, host lifetime, health-check diagnostics, Kestrel transport, and selected routing/model-binding/versioning events below Warning. These filters are package defaults; review them against the diagnostic requirements of the deployed application.
Operational guidance
- Configure sink destinations, retention, access controls, and shipping in accordance with the deployment environment.
- Treat logs as potentially sensitive data. Avoid credentials, tokens, and unnecessary personal data.
- Do not assume the package configures an OpenTelemetry exporter or an Elastic APM production agent.
- Choose one host logging extension deliberately; do not stack multiple competing Serilog configurations.
License
MIT. See LICENSE.
| 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
- Elastic.Apm.Extensions.Hosting (>= 1.34.5)
- Elastic.Apm.NetCoreAll (>= 1.34.5)
- Elastic.Apm.SerilogEnricher (>= 9.0.0)
- Elastic.Serilog.Sinks (>= 9.0.0)
- Serilog.AspNetCore (>= 10.0.0)
- Serilog.Enrichers.Demystifier (>= 1.0.3)
- Serilog.Enrichers.Environment (>= 3.0.1)
- Serilog.Enrichers.Thread (>= 4.0.0)
- Serilog.Sinks.Console (>= 6.1.1)
- Serilog.Sinks.Debug (>= 3.0.0)
- Serilog.Sinks.Elasticsearch (>= 10.0.0)
- Serilog.Sinks.File (>= 7.0.0)
- SharpCompress (>= 0.50.7)
- Snappier (>= 1.3.1)
NuGet packages (7)
Showing the top 5 NuGet packages that depend on Franz.Common.Logging:
| Package | Downloads |
|---|---|
|
Franz.Common.Messaging.Hosting
Shared utility library for the Franz Framework. |
|
|
Franz.Common.Bootstrap
Shared utility library for the Franz Framework. |
|
|
Franz.Common.SSO
Shared utility library for the Franz Framework. |
|
|
Franz.Common.Messaging.AzureEventBus
Shared utility library for the Franz Framework. |
|
|
Franz.Common.Messaging.AzureEventHubs
Shared utility library for the Franz Framework. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 3.0.0 | 168 | 11/10/2026 |
| 2.3.4 | 509 | 11/1/2026 |
| 2.3.3 | 469 | 10/28/2026 |
| 2.3.2 | 261 | 10/27/2026 |
| 2.3.1 | 314 | 10/26/2026 |
| 2.3.0 | 430 | 7/21/2026 |
| 2.2.19 | 303 | 7/19/2026 |
| 2.2.18 | 307 | 7/19/2026 |
| 2.2.17 | 1,135 | 7/12/2026 |
| 2.2.16 | 311 | 7/2/2026 |
| 2.2.15 | 311 | 6/29/2026 |
| 2.2.14 | 313 | 6/29/2026 |
| 2.2.13 | 303 | 6/29/2026 |
| 2.2.12 | 302 | 6/28/2026 |
| 2.2.11 | 320 | 6/28/2026 |
| 2.2.10 | 309 | 6/28/2026 |
| 2.2.9 | 305 | 6/28/2026 |
| 2.2.8 | 300 | 6/28/2026 |
| 2.2.7 | 320 | 6/7/2026 |
| 2.2.6 | 307 | 6/6/2026 |