KEMBAR78
[Analyzer] Replacing direct LoggerExtensions.Log* usage with source-generated logging methods · Issue #78406 · dotnet/runtime · GitHub
Skip to content

[Analyzer] Replacing direct LoggerExtensions.Log* usage with source-generated logging methods #78406

@stephentoub

Description

@stephentoub

Just as we have a regex source generator analyzer that flags use of Regex and creates a replacement that uses the source generator, we should consider an analyzer that will push code to use the logging source generator. The analyzer would flag direct use of LoggerExtensions.Log* methods and recommend replacing them with use of the logging generator, with the fixer generating a partial method stub for the generator and changing the call site to use it.

Performance rules Category
Severity = none (off by default)

Metadata

Metadata

Assignees

No one assigned

    Labels

    api-approvedAPI was approved in API review, it can be implementedarea-Extensions-Loggingcode-analyzerMarks an issue that suggests a Roslyn analyzercode-fixerMarks an issue that suggests a Roslyn code fixerhelp wanted[up-for-grabs] Good issue for external contributorspartner-impactThis issue impacts a partner who needs to be kept updated

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions