Pocok.AppDefaults.Logging
0.2.0-alpha.7
Prefix Reserved
dotnet add package Pocok.AppDefaults.Logging --version 0.2.0-alpha.7
NuGet\Install-Package Pocok.AppDefaults.Logging -Version 0.2.0-alpha.7
<PackageReference Include="Pocok.AppDefaults.Logging" Version="0.2.0-alpha.7" />
<PackageVersion Include="Pocok.AppDefaults.Logging" Version="0.2.0-alpha.7" />
<PackageReference Include="Pocok.AppDefaults.Logging" />
paket add Pocok.AppDefaults.Logging --version 0.2.0-alpha.7
#r "nuget: Pocok.AppDefaults.Logging, 0.2.0-alpha.7"
#:package Pocok.AppDefaults.Logging@0.2.0-alpha.7
#addin nuget:?package=Pocok.AppDefaults.Logging&version=0.2.0-alpha.7&prerelease
#tool nuget:?package=Pocok.AppDefaults.Logging&version=0.2.0-alpha.7&prerelease
Pocok.AppDefaults.Logging
Pocok.AppDefaults.Logging applies a small, repeatable baseline to Microsoft.Extensions.Logging without replacing the
framework or owning any sink.
var builder = Host.CreateApplicationBuilder(args);
builder.AddPocokLoggingDefaults(options =>
{
options.CategoryMinimumLevels["Microsoft"] = LogLevel.Warning;
});
Configuration is read first from Pocok:Logging, then the optional delegate is applied. The resolved startup policy is
available through IOptions<LoggingDefaultsOptions>. Defaults add trace and span correlation and no global filtering.
Existing providers are preserved unless ClearProviders is explicitly enabled.
Simple-console registration is disabled by default because the standard application host already registers logging
providers. Enable AddSimpleConsole only when the composition root deliberately owns that provider, commonly together
with ClearProviders. The package never chooses a file, network endpoint, or third-party sink.
Applying the configurator more than once to the same builder throws InvalidOperationException. This makes conflicting
composition visible instead of silently ignoring the later options. Application registrations made after these defaults
remain authoritative where the standard logging builder uses last-registration or ordered-filter semantics.
Serilog-specific integration belongs to Pocok.AppDefaults.Logging.Serilog.
Example configuration:
{
"Pocok": {
"Logging": {
"AddSimpleConsole": false,
"MinimumLevel": "Information",
"CategoryMinimumLevels": {
"Microsoft": "Warning"
}
}
}
}
| 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.Configuration.Binder (>= 10.0.10)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.10)
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.10)
- Microsoft.Extensions.Logging (>= 10.0.10)
- Microsoft.Extensions.Logging.Console (>= 10.0.10)
- Microsoft.Extensions.Options (>= 10.0.10)
- Pocok.AppDefaults (>= 0.2.0-alpha.7)
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.2.0-alpha.7 | 53 | 7/20/2026 |
| 0.2.0-alpha.6 | 48 | 7/20/2026 |
| 0.2.0-alpha.5 | 46 | 7/18/2026 |
| 0.1.0-alpha.1 | 43 | 7/15/2026 |