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
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Franz.Common.Logging" Version="3.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Franz.Common.Logging" Version="3.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Franz.Common.Logging" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Franz.Common.Logging --version 3.0.0
                    
#r "nuget: Franz.Common.Logging, 3.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Franz.Common.Logging@3.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Franz.Common.Logging&version=3.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Franz.Common.Logging&version=3.0.0
                    
Install as a Cake Tool

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-.log files with a retained-file limit of 10.
  • Non-development: Information minimum level, console output, daily JSON logs/prod-sre-.json and human-readable logs/prod-dev-.log files.

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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
Loading failed