liveBook · Manning

Logging module

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

A logging library provides APIs for recording and routing diagnostic and operational messages from an application.

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

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

How deep it goes
Explains the architecture, dependency-injection integration, ILogger records, verbosity, and logging providers.
Examples
Uses negative shopping-cart totals, exceptions, console output, files, and external services as logging examples.
What it assumes
Assumes an ASP.NET Core application context while introducing dependency injection as the connection between code and logging.
What you can do after
Diagnose application errors by creating structured log messages and routing them to suitable destinations.
How it connects
Connects dependency injection, ILogger, logging providers, ASP.NET Core, third-party libraries, and configuration libraries.

Also explained in

Compare how 4 books explain logging module →

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.