Soenneker.Extensions.Configuration.Logging 11.0.269

Prefix Reserved
dotnet add package Soenneker.Extensions.Configuration.Logging --version 11.0.269
                    
NuGet\Install-Package Soenneker.Extensions.Configuration.Logging -Version 11.0.269
                    
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="Soenneker.Extensions.Configuration.Logging" Version="11.0.269" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Soenneker.Extensions.Configuration.Logging" Version="11.0.269" />
                    
Directory.Packages.props
<PackageReference Include="Soenneker.Extensions.Configuration.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 Soenneker.Extensions.Configuration.Logging --version 11.0.269
                    
#r "nuget: Soenneker.Extensions.Configuration.Logging, 11.0.269"
                    
#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 Soenneker.Extensions.Configuration.Logging@11.0.269
                    
#: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=Soenneker.Extensions.Configuration.Logging&version=11.0.269
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.Extensions.Configuration.Logging&version=11.0.269
                    
Install as a Cake Tool

alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image

alternate text is missing from this package README image Soenneker.Extensions.Configuration.Logging

Resolves a Serilog LogEventLevel from IConfiguration using a preferred key and a backward-compatible legacy key.

Installation

dotnet add package Soenneker.Extensions.Configuration.Logging

Configuration

Use Log:Levels:Default for new applications:

{
  "Log": {
    "Levels": {
      "Default": "Information"
    }
  }
}

Log:DefaultLogLevel remains supported for applications using the earlier configuration shape:

{
  "Log": {
    "DefaultLogLevel": "Warning"
  }
}

Supported values are Verbose, Debug, Information, Warning, Error, and Fatal. Matching is case-insensitive.

Usage

using Soenneker.Extensions.Configuration.Logging;
using Serilog;

var level = configuration.GetLogEventLevel();

Log.Logger = new LoggerConfiguration()
    .MinimumLevel.Is(level)
    .WriteTo.Console()
    .CreateLogger();

Resolution is deterministic:

  1. Log:Levels:Default is used when present.
  2. Otherwise, Log:DefaultLogLevel is used when present.
  3. When neither key exists, the result is Information.

An explicitly configured but unsupported value throws InvalidOperationException. This prevents a typo in the preferred key from being hidden by the legacy key or an unexpectedly permissive fallback.

The extension only resolves the level. It does not create a logger, add sinks, reload configuration, or change Serilog's global logger.

Product Compatible and additional computed target framework versions.
.NET net11.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (3)

Showing the top 3 NuGet packages that depend on Soenneker.Extensions.Configuration.Logging:

Package Downloads
Soenneker.Utils.Logger

Builds cached Microsoft loggers backed by Serilog and exposes a shared runtime level switch.

Soenneker.Extensions.LoggerConfiguration.ApplicationInsights

Serilog LoggerConfiguration extension methods related to Application Insights

Soenneker.Extensions.LoggerConfiguration.Hangfire

Serilog LoggerConfiguration extension methods related to Hangfire

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
11.0.269 4,392 12/2/2026
11.0.268 25,503 11/30/2026
11.0.267 76 11/30/2026
11.0.266 17,161 11/29/2026
11.0.265 22,121 11/18/2026
11.0.263 4,489 11/18/2026
11.0.262 37,427 11/11/2026
11.0.261 1,365 11/11/2026
11.0.260 4,165 11/10/2026
11.0.259 115 11/10/2026
11.0.258 126 11/10/2026
11.0.257 81,758 10/26/2026
11.0.256 320 10/26/2026
4.0.255 390 10/26/2026
4.0.254 114 10/25/2026
4.0.253 41,939 10/15/2026
4.0.252 2,232 10/14/2026
4.0.251 128 10/14/2026
4.0.250 9,199 10/14/2026
4.0.245 981 10/13/2026
Loading failed

Update NuGet resilient publish to v6