Logging backend for log4net.
Implements
Namespace: PostSharp.Patterns.Diagnostics.Backends.Log4Net
Assembly: PostSharp.Patterns.Diagnostics.Backends.Log4Net.dll
Syntax
public class Log4NetLoggingBackend : TextLoggingBackend, IDisposableRemarks
To use this backend, configure log4net, then assign a new instance to DefaultBackend when the application starts. To also route the events that your code logs directly with log4net through PostSharp Logging, call RedirectLoggingToPostSharp() and pass the relay repository it returns to the constructor of this class.
Constructors
| Name | Description |
|---|---|
| Log4NetLoggingBackend(ILoggerRepository) | Initializes a new instance of the Log4NetLoggingBackend class. |
Properties
| Name | Description |
|---|---|
| Options | Gets the backend options. |
| Repository | Gets the log4net repository from which the loggers are retrieved. |
Methods
| Name | Description |
|---|---|
| CreateRecordBuilder() | Creates a new LogRecordBuilder. |
| CreateTypeSource(LoggingNamespaceSource, Type) | Creates a LoggingTypeSource for the given role and type. |
| CreateTypeSourceBySourceName(LoggingNamespaceSource, string) | Creates a LoggingTypeSource for the given role and logger name. |
| GetTextBackendOptions() | Gets the options. |