A logging level is a named threshold that controls which messages a category emits. Messages below the configured minimum are discarded; None disables messages for that category. section 15.3.3
Choose a level according to the detail and urgency required:
- Trace records low-level diagnostic detail. section 15.3.1
- Debug supports development diagnostics and production problem resolution. section 15.3.1
- Information records the application’s general state. section 15.3.1
- Warning records unexpected minor problems; Error records unhandled errors; Critical records serious failures. section 15.3.1
ASP.NET Core reads thresholds from the Logging:LogLevel configuration section. A category comes from the logger’s generic type or explicit name: Platform.Population can receive a direct setting, inherit one from Platform, or fall back to Default. section 15.3.3 section 15.2
Development and database diagnostics
A development configuration can set Default to Debug while retaining Information for System and Microsoft. A database-oriented configuration can set Microsoft.EntityFrameworkCore to Information so Entity Framework Core SQL statements appear in the log. section 15.3.3 section 17.5.3
Listing 15.24 Configuring the appsettings.Development.json file in the Platform folder
{
"Logging": {
"LogLevel": {
"Default": "Debug",
"System": "Information",
"Microsoft": "Information",
"Microsoft.AspNetCore": "Warning",
"Microsoft.AspNetCore.Routing": "Debug"
}
}
}
Inspect a category-specific configuration that keeps general ASP.NET Core logging at Warning while enabling Debug output for routing. section 15.3.3








