WrappingPrefixLogger class¶
Defined in
Namespace: Splat
Assembly: Splat.Logging.dll
Full name: Splat.WrappingPrefixLogger
Modifiers: public
Summary¶
Provides an ILogger implementation that prefixes all log messages with the name of a specified type, enabling easier
identification of log sources.
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
Class hierarchy
classDiagram
class WrappingPrefixLogger
class ILogger {
<>
}
ILogger <|.. WrappingPrefixLogger
Implements: ILogger
Remarks¶
This logger is useful for scenarios where log output should be clearly associated with a particular class or component. All log messages written through this logger are automatically prefixed with the name of the provided type, followed by a colon and a space. This can help distinguish log entries in applications with multiple components sharing a common logging infrastructure.
Constructors¶
| Name | Summary |
|---|---|
| .ctor | Provides an ILogger implementation that prefixes all log messages with the name of a specified type, enabling easier identification of log sources. |
Properties¶
| Name | Summary |
|---|---|
| Level | Gets the level at which the target will emit messages. |
Methods¶
| Name | Summary |
|---|---|
| Write | Writes a message to the target. |