The Logging section controls which messages ASP.NET Core writes through its logging providers. Filtering keeps useful information visible without allowing framework noise to overwhelm production output. section 26.4
A log-filtering rule can use three properties:
- Log level, such as Information, Warning, or Error. section 26.4
- Logger category, such as Microsoft or System, usually matching a namespace prefix. section 26.4
- Logger provider, such as Console or File, allowing different output destinations to use different minimum levels. section 26.4
appsettings.json
A Logging configuration can set a default minimum level, quieter levels for Microsoft and System categories, and provider-specific overrides. For example, the console can accept Debug messages by default while keeping Microsoft messages at Warning or above.
