Skip to content

MicrosoftExtensionsLoggingLogger class

Attributes: [DebuggerDisplay("Name={_logger.GetType()} Level={Level}")]

Defined in

Namespace: Splat.Microsoft.Extensions.Logging Assembly: Splat.Microsoft.Extensions.Logging.dll Full name: Splat.Microsoft.Extensions.Logging.MicrosoftExtensionsLoggingLogger Modifiers: public sealed

Summary

View source

Provides an adapter that wraps a Microsoft.Extensions.Logging.ILogger instance for use with the ILogger interface.

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, net471

Class hierarchy
classDiagram
class MicrosoftExtensionsLoggingLogger
class ILogger {
    <>
}
ILogger <|.. MicrosoftExtensionsLoggingLogger

Implements: ILogger

Remarks

This class enables integration between components expecting an ILogger implementation and the Microsoft.Extensions.Logging infrastructure. It delegates all logging operations to the underlying Microsoft.Extensions.Logging.ILogger instance supplied at construction. Thread safety and log level filtering are determined by the behavior of the wrapped logger.

Constructors

NameSummary
.ctorInitializes a new instance of the [MicrosoftExtensionsLoggingLogger](# class.

Properties

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

Methods

NameSummary
WriteWrites a message to the target.
Inherited members