Skip to content

[API Proposal]: ProviderAliasAttribute: Better move to Microsoft.Extensions.Logging.Abstractions #114532

@SetTrend

Description

@SetTrend

Background and motivation

The ProviderAliasAttribute class should rather be defined in the Microsoft.Extensions.Logging.Abstractions package than in the Microsoft.Extensions.Logging package.

Defining a new logging provider doesn't need anything beyond the Microsoft.Extensions.Logging.Abstractions package — except for the ProviderAliasAttribute.

Being required to include the Microsoft.Extensions.Logging package instead of the Microsoft.Extensions.Logging.Abstractions package adds an unnecessary attack surface and dependencies.

The namespace could remain, so this won't break any existing code. I propose just to move the ProviderAliasAttribute class definition to the Microsoft.Extensions.Logging.Abstractions package.

Risks

None.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-Extensions-LoggingenhancementProduct code improvement that does NOT require public API changes/additions

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions