Skip to content

WrappingPrefixLogger class

Defined in

Namespace: Splat Assembly: Splat.Logging.dll Full name: Splat.WrappingPrefixLogger Modifiers: public

Summary

View source

        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

NameSummary
.ctorProvides an ILogger implementation that prefixes all log messages with the name of a specified type, enabling easier identification of log sources.

Properties

NameSummary
LevelGets the level at which the target will emit messages.

Methods

NameSummary
WriteWrites a message to the target.
Inherited members