Appearance
ForwardingLoggerFactory Class
Definition
An ILoggerFactory that returns the same ILogger for every category.
- Namespace:
JASE - Assembly:
JASE.dll
Constructors
| Name | Description |
|---|---|
ForwardingLoggerFactory(ILogger logger) | Creates a factory that always returns logger. |
Methods
| Name | Description |
|---|---|
void AddProvider(ILoggerProvider provider) | |
ILogger CreateLogger(string categoryName) | |
void Dispose() |
Remarks
Use when a host already has a named logger (for example "Database") and wants suite components that call Microsoft.Extensions.Logging.ILoggerFactory.CreateLogger(System.String) to write through that logger. Category names requested by the library are ignored.
This adapter does not change log levels. The wrapped ILogger must still return from Microsoft.Extensions.Logging.ILogger.IsEnabled(Microsoft.Extensions.Logging.LogLevel) for the levels the library emits (command success uses Information).
See the Database logging guide for statement-level SQL configuration.