WrappingLogLevelLogger(ILogger) constructor¶
Defined in
Type: WrappingLogLevelLogger
Namespace: Splat
Assembly: Splat.Logging.dll
Applies to
net10.0, net10.0-browserwasm1.0, net10.0-desktop1.0, net9.0, net9.0-browserwasm1.0, net9.0-desktop1.0, net8.0, net8.0-ios17.5, net8.0-maccatalyst17.5, net8.0-macos14.2, net8.0-macos14.5, net8.0-tvos17.2, netstandard2.1, net462, net481
public WrappingLogLevelLogger(ILogger inner)
Summary: Provides an ILogger implementation that prefixes log messages with their log level before delegating to an inner logger.
Parameters
| Name | Type | Description |
|---|---|---|
inner | [ILogger](# | The underlying ILogger instance to which log messages are forwarded. Cannot be null. |
Remarks
This logger wraps another ILogger and automatically prepends the log level to each message. It is useful for scenarios where the inner logger does not include log level information in its output. All logging operations are delegated to the specified inner logger.