Franz.Common.Logging
2.3.1
See the version list below for details.
dotnet add package Franz.Common.Logging --version 2.3.1
NuGet\Install-Package Franz.Common.Logging -Version 2.3.1
<PackageReference Include="Franz.Common.Logging" Version="2.3.1" />
<PackageVersion Include="Franz.Common.Logging" Version="2.3.1" />
<PackageReference Include="Franz.Common.Logging" />
paket add Franz.Common.Logging --version 2.3.1
#r "nuget: Franz.Common.Logging, 2.3.1"
#:package Franz.Common.Logging@2.3.1
#addin nuget:?package=Franz.Common.Logging&version=2.3.1
#tool nuget:?package=Franz.Common.Logging&version=2.3.1
Franz.Common.Logging
Shared framework capability for the Franz.Common framework on .NET 10.
Overview
The Franz.Common.Logging package provides shared framework capability within Franz.Common. It is designed to compose with the rest of the framework rather than imposing unrelated infrastructure choices on every application.
Installation
dotnet add package Franz.Common.Logging
Design principles
- Explicit composition: register only the capabilities the application needs.
- Clear boundaries: keep domain and application contracts independent from provider-specific infrastructure where the package's role permits it.
- Predictable behavior: make configuration, failure modes, and lifecycle ownership visible rather than relying on hidden conventions.
- Operational readiness: validate security, resilience, diagnostics, and compatibility for the actual deployment environment.
Usage and configuration
Follow the package-specific setup, configuration, and code examples below. Only configure external services when this package requires them, and keep secrets outside source control.
Package-specific guide
A comprehensive logging library within the Franz Framework, designed to enhance application monitoring and diagnostics using Serilog and Elastic APM. This package provides tools for centralized logging, tracing, and seamless integration with .NET applications.
- Current Version: v2.3.0
- Part of the private Franz Framework ecosystem.
What’s New in 2.2.17
Desktop Application Support
UseDesktopLog()extension providing thread-aware logging for WPF/Avalonia/MAUI.ThreadIdEnricheradded for high-fidelity concurrency diagnostics.Optimized templates: removed web-specific noise (ReqId/Path) to clean up local output.
Dual Production Logging (v1.7.6+)
SRE logs: JSON, structured, minimal noise, easy to ship to ELK/Datadog.
Dev logs: human-readable, verbose, retains stack traces for troubleshooting.
Self-contained, production-ready defaults
Automatic UTF-8-safe encoding, rolling files, environment-aware enrichers.
Global noise suppression applied consistently.
Features
Centralized Logging
Integration with Serilog for structured and enriched logs.
Tracing Utilities
TraceHelperfor advanced tracing support in distributed applications.Host Extensions
UseLog()for strict, environment-aware logging.UseHybridLog()for flexible, configuration-driven logging.UseDesktopLog()for thread-aware desktop diagnostics.Elastic APM Integration
Full support for Elastic APM (enabled automatically in DEBUG).
Dual Production Logging
JSON logs for SRE (prod-sre-.json).
Human-readable logs for Dev (prod-dev-.log).
Installation
From Private Azure Feed
dotnet nuget add source "https://your-private-feed-url" \
--name "AzurePrivateFeed" \
--username "YourAzureUsername" \
--password "YourAzurePassword" \
--store-password-in-clear-text
Install the package:
dotnet add package Franz.Common.Logging --version 2.2.18
Usage
1. Strict Environment-Aware Logging (UseLog)
using Franz.Common.Logging.Extensions;
var host = Host.CreateDefaultBuilder(args)
.UseLog()
.Build();
await host.RunAsync();
2. Desktop-Optimized Logging (UseDesktopLog)
using Franz.Common.Logging.Extensions;
var host = Host.CreateDefaultBuilder(args)
.UseDesktopLog()
.Build();
await host.RunAsync();
- Thread Enrichment: Injects
ThreadIdfor tracking UI vs. background execution. - Desktop Template:
[{Timestamp:HH:mm:ss} {Level:u3}] {SourceContext} | Thread:{ThreadId} | {Message:lj}.
3. Hybrid Logging (UseHybridLog)
using Franz.Common.Logging.Extensions;
var host = Host.CreateDefaultBuilder(args)
.UseHybridLog()
.Build();
await host.RunAsync();
Changelog
v2.2.18 - Desktop Diagnostics
- Introduced
UseDesktopLog()for desktop-first applications. - Added
ThreadIdEnricherfor high-fidelity concurrency diagnostics. - Optimized log templates for desktop output, removing web-specific infrastructure noise.
v2.2.17 - Filter hardening
- Logging filters hardened to prevent accidental log noise in production environments.
- Logging Filters Improved to avoid noise in development environments.
v2.0.1 – Internal Modernization
- Messaging and infrastructure refactored for async, thread-safety, and modern .NET 10 patterns.
- All APIs remain fully backward compatible.
Version 1.7.6
- Dual production logs:
prod-sre-.jsonfor SRE,prod-dev-.logfor Dev - UTF-8 safe, rolling files, 30-day retention
- Console logging preserved for live monitoring
- Noise suppression applied consistently across logs
- Integration-ready for Franz.Common.OpenTelemetry
Dependency maintenance — October 2026
The logging package is aligned with the .NET 10 servicing baseline. Snappier is pinned to patched version 1.3.1 because the dependency graph previously resolved vulnerable 1.0.0. The public logging contracts are not intentionally changed. Validate restore, Release build, and the full solution tests before publishing. See the central dependency upgrade record.
| 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 |
|---|---|---|
| 2.3.3 | 185 | 10/28/2026 |
| 2.3.2 | 122 | 10/27/2026 |
| 2.3.1 | 273 | 10/26/2026 |
| 2.3.0 | 413 | 7/21/2026 |
| 2.2.19 | 296 | 7/19/2026 |
| 2.2.18 | 297 | 7/19/2026 |
| 2.2.17 | 583 | 7/12/2026 |
| 2.2.16 | 303 | 7/2/2026 |
| 2.2.15 | 306 | 6/29/2026 |
| 2.2.14 | 306 | 6/29/2026 |
| 2.2.13 | 297 | 6/29/2026 |
| 2.2.12 | 295 | 6/28/2026 |
| 2.2.11 | 312 | 6/28/2026 |
| 2.2.10 | 299 | 6/28/2026 |
| 2.2.9 | 297 | 6/28/2026 |
| 2.2.8 | 293 | 6/28/2026 |
| 2.2.7 | 310 | 6/7/2026 |
| 2.2.6 | 300 | 6/6/2026 |
| 2.2.5 | 308 | 6/4/2026 |
| 2.2.4 | 302 | 6/3/2026 |