liveBook · Manning

Provider-specific rule

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

A provider-specific rule is a filtering rule whose applicability is restricted to a named logging provider.

A provider-specific rule filters logs for one named provider, such as Console. The provider applies the most specific matching rule before writing or discarding each message. section 26.4

Console-specific filtering

An appsettings.json configuration can set a general minimum level and then override it for Console: Console logs below Error are excluded, while another provider may still receive them. section 26.4

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

How deep it goes
Explains matching across provider, category, and level, then demonstrates configuration without detailing framework internals.
Examples
Uses Console and File provider settings, namespace filters, and a rule-selection diagram.
What it assumes
Assumes familiarity with logging providers, log levels, and categories while establishing how filtering rules combine.
What you can do after
Configure provider-specific minimum levels in appsettings.json and predict which providers receive each log.
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.