ILoggerTCategoryName
ILoggerTCategoryName is the generic form of the logging interface used in the Microsoft.Extensions.Logging framework. It is defined as ILogger<TCategoryName> and inherits from ILogger, with the category name automatically derived from the type parameter TCategoryName. By default, the category represents the full type name, including its namespace, which helps organize and filter log output by source.
Usage typically involves dependency injection. In a class named OrderService, for example, a constructor can request
The typed logger provides the same logging capabilities as a non-generic ILogger, including Log, BeginScope, and
Configuration and filtering can target the specific category name derived from TCategoryName. For example, in appsettings.json
See also: Microsoft.Extensions.Logging, ILogger, ILoggerFactory, Dependency Injection, AppSettings configuration.