Skip to content

Add an interface to LoggingLevelSwitch #396

@simonfox

Description

@simonfox

Is your feature request related to a problem? Please describe.
We use Lamar as our DI container https://github.com/JasperFx/lamar which has an Auto Wiring feature - https://jasperfx.github.io/lamar/guide/ioc/auto-wiring.html#auto-wiring

ReadFrom.Services is looking for a concrete LoggingLevelSwitch which means Lamar will provide an auto wired instance even if I don't register one. That means that if I use ReadFrom.Configration (in the recommended order before ReadFrom.Services) my minimum level in appsettings isn't respected.

Describe the solution you'd like
Add an interface to LoggingLevelSwitch and look for a that interface in the service collection - this is in alignment with the other configuration points that are resolved from services.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions