ILoggingBuilder is the configuration surface exposed through WebApplicationBuilder for selecting and customizing logging providers in an ASP.NET Core web API. section 7.2.4
var builder = WebApplication.CreateBuilder(args); builder.Logging .ClearProviders() #1 .AddSimpleConsole()#2 .AddDebug(); #3
Start with the default providers, clear them, then add only the console and debug providers required by the application. section 7.2.4
Configure and verify providers
In Program.cs, call builder.Logging.ClearProviders(), then add the desired providers. A console formatter can enable single-line output, HH:mm:ss timestamps, and UTC time. Launch the MyBGList API in Debug mode, execute BoardGamesController.Get, and check the command prompt for the formatted message. section 7.2.4
