Skip to content

ASP.NET Core 2.1 custom logger lifetime #6423

@GoFightNguyen

Description

@GoFightNguyen

I created an a custom implementation of ILogger and ILoggerProvider in order to function with my enterprise's logging system. The lifetime of my custom ILogger appears to be a singleton; I can make numerous requests and see the ILoggerProvider.CreateLogger is only invoked the first time.

Is it possible to configure my custom implementation to have a scoped lifetime?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions