A logging module records application events and unexpected conditions, helping developers diagnose errors and connect related activity across an application. section 26.0
A logging module provides a consistent path from application code to readable diagnostic output:
- Uses a generic logging interface throughout ASP.NET Core, libraries, and application code. section 26.0
- Creates messages through ILogger, whose records include a log level, category, and message. section 26.0
- Routes output through logging providers to destinations such as the console, a file, or an external service. section 26.0
- Controls log verbosity for different parts of the application, including framework and library code. section 26.0
Diagnosing an unexpected condition
If a shopping cart receives a negative total or an exception occurs, application logging can record the event and route it to a destination where it can be investigated. section 26.0



