pdevito3 / craftsman

A .NET scaffolding tool to help you stop worrying about boilerplate and focus on your business logic 🚀
https://wrapt.dev
MIT License
1.12k stars 65 forks source link

loggingLevelSwitch dev/prod incorrectly configured #128

Closed idormenco closed 11 months ago

idormenco commented 11 months ago

After scaffolding a new project in the file LoggingConfiguration.cs we have the configuration for LoggingLevelSwitch

 public static void AddLoggingConfiguration(this IHostBuilder host, IWebHostEnvironment env)
    {
        var loggingLevelSwitch = new LoggingLevelSwitch();

        if (env.IsDevelopment())
            loggingLevelSwitch.MinimumLevel = LogEventLevel.Warning;

        if (env.IsProduction())
            loggingLevelSwitch.MinimumLevel = LogEventLevel.Information;
        ....
    }

I think it should be other way around Warning in Prod and Info in Development.

pdevito3 commented 11 months ago

Commented on the PR in more detail but this will be moot in the next release so I'm going to close this 👍