Skip to content

Minimal host does not read environment specific configuration for logging #32383

@davidfowl

Description

@davidfowl

Describe the bug

The new minimal host doesn't seem to read the appsettings.{env}.json.

To Reproduce

Program.cs

var app = WebApplication.Create(args);
Console.WriteLine(((IConfigurationRoot)app.Configuration).GetDebugView());

appsettings.Development.json

{
  "Logging": {
    "LogLevel": {
      "Default": "Information",
      "Microsoft": "Debug",
      "Microsoft.Hosting.Lifetime": "Information"
    }
  }
}

Further technical details

Microsoft.AspNetCore.App 6.0.0-preview.4.21222.16 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]

Metadata

Metadata

Assignees

Labels

area-minimalIncludes minimal APIs, endpoint filters, parameter binding, request delegate generator etcbugThis issue describes a behavior which is not expected - a bug.feature-minimal-hosting

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions