Use LoggerFactory.Create(...) instead of new LoggerFactory()
ProprietaryRewrites the obsolete new LoggerFactory() plus ILoggerFactory.Add*() provider configuration to LoggerFactory.Create(builder => ...), moving each provider registration onto the ILoggingBuilder. Handles both the chained form and the form where registration calls follow the declaration as separate statements. Argument shapes with no ILoggingBuilder equivalent are left in place and flagged for manual migration.
OpenRewrite. Recipes. CSharp. Migration. Dotnet. AspNetCore3. UseLoggerFactoryCreatemod run . --recipe= OpenRewrite. Recipes. CSharp. Migration. Dotnet. AspNetCore3. UseLoggerFactoryCreateInstall it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.