liveBook · Manning

Logging section

As explained in ASP.NET Core in Action, 3e

The Logging section is the standard ASP.NET Core configuration section containing logging provider and filtering settings.

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.

How ASP.NET Core in Action, 3e covers it

How deep it goes
Explains level, category, and provider matching, then stops short of implementing custom providers.
Examples
Uses appsettings.json rules, console and file providers, Microsoft and System categories, and provider-specific minimum levels.
What it assumes
Assumes familiarity with ASP.NET Core configuration and introduces filtering through concrete logging settings.
What you can do after
Configure logging filters that select different minimum levels for categories and providers.
How it connects
Connects logging providers with log levels, logger categories, namespaces, and configuration.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of ASP.NET Core in Action, 3e. The section links point to the parts of the book it draws on.