Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixer/Analyzer: Suggest rewriting builder.Host.ConfigureLogging to builder.Logging #35816

Closed
Tracked by #36637
davidfowl opened this issue Aug 27, 2021 · 1 comment
Closed
Tracked by #36637
Assignees
Labels
analyzer Indicates an issue which is related to analyzer experience area-minimal Includes minimal APIs, endpoint filters, parameter binding, request delegate generator etc area-web-frameworks *DEPRECATED* This label is deprecated in favor of the area-mvc and area-minimal labels feature-minimal-hosting Priority:2 Work that is important, but not critical for the release

Comments

@davidfowl
Copy link
Member

davidfowl commented Aug 27, 2021

Simialr to #35815. We should rewrite:

var builder = WebApplication.CreateBuilder(args);

builder.Host.ConfigureLogging(logging =>
{
    logging.AddJsonConsole();
});

// OR

builder.WebHost.ConfigureLogging(logging =>
{
    logging.AddJsonConsole();
});

To:

var builder = WebApplication.CreateBuilder(args);

builder.Logging.AddJsonConsole();
@davidfowl davidfowl added area-web-frameworks *DEPRECATED* This label is deprecated in favor of the area-mvc and area-minimal labels and removed area-runtime labels Aug 27, 2021
@rafikiassumani-msft rafikiassumani-msft added this to the Backlog milestone Aug 31, 2021
@ghost
Copy link

ghost commented Aug 31, 2021

We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.

@rafikiassumani-msft rafikiassumani-msft added analyzer Indicates an issue which is related to analyzer experience Cost:M Priority:2 Work that is important, but not critical for the release labels Jan 6, 2022
pedro-camargo11 added a commit to pedro-camargo11/aspnetcore that referenced this issue Jun 22, 2022
pedro-camargo11 added a commit that referenced this issue Jun 28, 2022
…ng (#42354)

* Add analyzer issue #35816

* Deleting uneccessary using statement and comment

* Make DiagnosticDescriptor title and description consistent with other DiagnosticDescriptors

* Update src/Framework/AspNetCoreAnalyzers/src/Analyzers/DiagnosticDescriptors.cs

Co-authored-by: Safia Abdalla <safia@safia.rocks>

Co-authored-by: Safia Abdalla <safia@safia.rocks>
@ghost ghost locked as resolved and limited conversation to collaborators Oct 29, 2022
@amcasey amcasey added the area-minimal Includes minimal APIs, endpoint filters, parameter binding, request delegate generator etc label Jun 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
analyzer Indicates an issue which is related to analyzer experience area-minimal Includes minimal APIs, endpoint filters, parameter binding, request delegate generator etc area-web-frameworks *DEPRECATED* This label is deprecated in favor of the area-mvc and area-minimal labels feature-minimal-hosting Priority:2 Work that is important, but not critical for the release
Projects
None yet
5 participants