Creating a project targeting ASP.NET Core 1.0 (and possibly others) used to add the following to Configure() method in Startup.cs:
loggerFactory.AddConsole(Configuration.GetSection("Logging"));
loggerFactory.AddDebug();
Those 2 methods are marked as deprecated in ASP.NET Core 2.2. How to properly migrate this?
⚠Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
@jansokoly You can safely remove these 2 lines of code. As of ASP.NET Core 2.0, this code runs when calling CreateDefaultBuilder from Program.Main. See https://github.com/aspnet/MetaPackages/blob/586d641934e997045ed98b1978684a7b0c607b39/src/Microsoft.AspNetCore/WebHost.cs#L182-L184.
Most helpful comment
@jansokoly You can safely remove these 2 lines of code. As of ASP.NET Core 2.0, this code runs when calling
CreateDefaultBuilderfromProgram.Main. See https://github.com/aspnet/MetaPackages/blob/586d641934e997045ed98b1978684a7b0c607b39/src/Microsoft.AspNetCore/WebHost.cs#L182-L184.