Soenneker.Extensions.Configuration.Logging 11.0.265

Prefix Reserved
dotnet add package Soenneker.Extensions.Configuration.Logging --version 11.0.265
                    
NuGet\Install-Package Soenneker.Extensions.Configuration.Logging -Version 11.0.265
                    
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.265" />
                    
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.265" />
                    
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.265
                    
#r "nuget: Soenneker.Extensions.Configuration.Logging, 11.0.265"
                    
#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.265
                    
#: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.265
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.Extensions.Configuration.Logging&version=11.0.265
                    
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.265 15,048 11/18/2026
11.0.263 4,456 11/18/2026
11.0.262 37,395 11/11/2026
11.0.261 1,362 11/11/2026
11.0.260 4,161 11/10/2026
11.0.259 114 11/10/2026
11.0.258 123 11/10/2026
11.0.257 81,755 10/26/2026
11.0.256 317 10/26/2026
4.0.255 388 10/26/2026
4.0.254 112 10/25/2026
4.0.253 41,932 10/15/2026
4.0.252 2,230 10/14/2026
4.0.251 126 10/14/2026
4.0.250 9,196 10/14/2026
4.0.245 974 10/13/2026
4.0.244 3,530 10/12/2026
4.0.242 6,114 10/12/2026
4.0.241 20,423 10/11/2026
4.0.240 1,373 10/11/2026
Loading failed

Updated Soenneker.Extensions.Configuration to 11.0.919