Log filtering selects messages for output by minimum severity, logger category or namespace, and provider. It reduces noisy output while preserving messages useful for diagnosing failures. section 26.4 section 26.2.1
A filtering setup can combine rules such as:
- Information or higher by default. section 26.4
- Warning or higher for categories beginning with Microsoft, reducing framework noise. section 26.4
- Error or higher for the console provider, while another provider may retain lower levels. section 26.4
- One most-specific rule per provider and message; applicable rules are not combined. section 26.4
Separate application and framework output
Configure appsettings.json with a Debug default, Warning for Microsoft categories, Information for file logging, and Debug for console logging while retaining the Microsoft Warning override. An Information message from a Microsoft category is therefore omitted by the console provider but can be written by the file provider. section 26.4

