Skip to content

Log4NetLogger class

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

Defined in

Namespace: Splat.Log4Net Assembly: Splat.Log4Net.dll Full name: Splat.Log4Net.Log4NetLogger Modifiers: public sealed

Summary

View source

Provides an implementation of the ILogger interface that writes log messages using a wrapped Log4Net logger instance.

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 Log4NetLogger
class ILogger {
    <>
}
ILogger <|.. Log4NetLogger
class IDisposable {
    <>
}
IDisposable <|.. Log4NetLogger

Implements: ILogger, IDisposable

Remarks

This class enables integration of Log4Net logging with components that consume the ILogger abstraction. The effective log level is determined from the underlying Log4Net configuration and is updated automatically if the configuration changes. Instances of this class are not thread-safe for disposal; ensure that Dispose is not called concurrently with logging operations.

Constructors

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

Properties

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

Methods

NameSummary
Dispose
WriteWrites a message to the target.
Inherited members