FclEx.Logging 2.4.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package FclEx.Logging --version 2.4.0
                    
NuGet\Install-Package FclEx.Logging -Version 2.4.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="FclEx.Logging" Version="2.4.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="FclEx.Logging" Version="2.4.0" />
                    
Directory.Packages.props
<PackageReference Include="FclEx.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 FclEx.Logging --version 2.4.0
                    
#r "nuget: FclEx.Logging, 2.4.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 FclEx.Logging@2.4.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=FclEx.Logging&version=2.4.0
                    
Install as a Cake Addin
#tool nuget:?package=FclEx.Logging&version=2.4.0
                    
Install as a Cake Tool

FclEx.Logging

Microsoft.Extensions.Logging helpers for FclEx.

What Is Included

  • Logger factory and provider convenience helpers.
  • In-memory collectors for log messages, metadata, and scopes.
  • Scoped logging-property helpers.
  • Operation timing helpers.
  • Null logger fallbacks and cleanup utilities.
  • Service registration helpers for logging-related options.

Usage Notes

  • This package uses Microsoft logging abstractions.
  • Serilog-specific helpers live in FclEx.Serilog.
  • Use scoped properties when downstream providers need structured context for an operation.

Collecting Logs

For a standalone collector:

using FclEx.Logging;
using Microsoft.Extensions.Logging;

var logger = new CollectingLogger("example");
using (logger.PushProperty("RequestId", 42))
{
    logger.LogInformation("Processing {Count} items", 3);
}

var entry = logger.Entries[0];
// entry.Message: "Processing 3 items"
// entry.State: the original structured message state
// entry.Scopes: the active scopes, ordered from outermost to innermost
logger.Clear();

Register the collector through ILoggingBuilder when using dependency injection:

using Microsoft.Extensions.DependencyInjection;

var services = new ServiceCollection();
services.AddLogging(builder => builder
    .SetMinimumLevel(LogLevel.Trace)
    .AddCollecting());

using var serviceProvider = services.BuildServiceProvider();
var factory = serviceProvider.GetRequiredService<ILoggerFactory>();
var collector = serviceProvider.GetRequiredService<CollectingLoggerProvider>();
factory.CreateLogger("example").LogDebug("Collected message");

var entries = collector.Entries;
collector.Clear();

For an existing factory, factory.AddCollecting() returns the newly added collector. Repeated calls to the builder extension register one singleton collector; repeated calls to the factory extension add independent collectors. Factory filters apply in both cases.

Entries returns a synchronized snapshot. Later writes and Clear() do not alter earlier snapshots. A provider combines entries from every category, and its loggers share that store. Scope stack membership is captured when a message is logged, while state and scope values remain the original objects and are not deep copied. Standalone collectors maintain their own async scope context; provider-created loggers share the factory's scope context.

Collectors accept every defined level except LogLevel.None. They retain entries until explicitly cleared, including after provider disposal, so clear them between test phases or when the retained data is no longer needed.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  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 is compatible.  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 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. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 is compatible.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos 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 FclEx.Logging:

Package Downloads
FclEx.Http

HTTP service helpers, request actions, response parsing, downloads/uploads, cookies, authentication, AngleSharp HTML helpers, and user-client abstractions.

FclEx.Serilog

Serilog configuration helpers, enrichers, filters, formatters, and sinks.

FclEx.AspNetCore

ASP.NET Core helpers for requests, sessions, model state, endpoints, authorization, request buffering, decompression, and logging context.

FclEx.Xunit

xUnit v2 assertions, conditional test attributes, output helpers, logging integration, and test utilities.

FclEx.Messaging

Kafka and RabbitMQ helpers for consumers, publishers, routers, message conversion, retry metadata, and messaging logs.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.4.1 0 10/8/2026
2.4.0 213 10/3/2026
2.3.9 399 9/27/2026
2.3.8 388 9/26/2026
2.3.7 387 9/24/2026
2.3.6 405 9/22/2026
2.3.5 401 9/22/2026
2.3.4 444 8/28/2026
2.3.3 486 8/22/2026
2.3.2 459 8/20/2026
2.3.1 461 8/19/2026
2.3.0 480 8/17/2026
2.2.9 562 7/18/2026
2.2.8 552 6/13/2026
2.2.6 513 6/8/2026
2.2.5 500 6/5/2026
2.2.4 495 6/5/2026
2.2.3 537 5/27/2026
2.2.2 512 5/26/2026
2.2.1 557 5/23/2026
Loading failed