Logging in ASP.NET Core

We will start this chapter by providing an overview of the different logging components of ASP.NET Core. The framework provides different interfaces that support logging:

  • ILoggerProvider is used to define a specific type of logging bind with an output channel
  • ILoggerFactory takes an ILoggerProvider interface and initializes it
  • The ILogger interface is a particular instance of the logging component

The logging interface structure of ASP.NET Core can be described using the following schema:

In short, the ILoggerProvider interface represents the output of the logs, ILoggerFactory creates the right type of instance, and ...

Get Hands-On RESTful Web Services with ASP.NET Core 3 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.