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 (opens in a new tab)
Provides an implementation of the ILogger interface that writes log messages using a wrapped Log4Net logger instance.
Applies to
net11.0, net10.0, net47, net471, net472, net48, net481
Class hierarchy
classDiagram
class Log4NetLogger
class ILogger {
<<interface>>
}
ILogger <|.. Log4NetLogger
class IDisposable {
<<interface>>
}
IDisposable <|.. Log4NetLogger
Implements: ILogger, IDisposable (opens in a new tab)
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¶
| Name | Summary |
|---|---|
| .ctor | Initializes a new instance of the [Log4NetLogger](#Splat.Log4Net.Log4NetLogger) class. |
Properties¶
| Name | Summary |
|---|---|
| Level | Gets the level at which the target will emit messages. |
Methods¶
| Name | Summary |
|---|---|
| Dispose | Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. |
| Write | Writes a message to the target. |
Inherited members
System.Object.Equals(System.Object)(opens in a new tab)System.Object.Equals(System.Object,System.Object)(opens in a new tab)System.Object.GetHashCode(opens in a new tab)System.Object.GetType(opens in a new tab)System.Object.MemberwiseClone(opens in a new tab)System.Object.ReferenceEquals(System.Object,System.Object)(opens in a new tab)System.Object.ToString(opens in a new tab)