Base class for all logging back-ends (sometimes names sinks, targets, listeners) of the PostSharp logging system.
Implements
Namespace: PostSharp.Patterns.Diagnostics
Assembly: PostSharp.Patterns.Diagnostics.dll
Syntax
public abstract class LoggingBackend : IDisposableRemarks
If you want to implement your own logging back-end, deriving from the TextLoggingBackend class, which implements standard logic for logging a text.
Constructors
| Name | Description |
|---|---|
| LoggingBackend() | Initializes a new LoggingBackend. |
Properties
| Name | Description |
|---|---|
| CurrentContext | Gets the current LoggingContext. |
| CurrentContextLocalConfiguration | Gets the LoggingContextLocalConfiguration for the current execution. Returns DefaultContextLocalConfiguration unless the context has been overwritten by WithContextLocalConfiguration(LoggingContextLocalConfiguration). |
| DefaultContextLocalConfiguration | Gets the default LoggingContextLocalConfiguration, used unless it has been overwritten by the WithContextLocalConfiguration(LoggingContextLocalConfiguration) for the current execution context. |
| DefaultVerbosity | Gets the LoggingVerbosityConfiguration of the DefaultContextLocalConfiguration. |
| IsCorrupted | Determines whether the current LoggingBackend is in a state where it can no longer be recovered. This typically happens when an exception occurs while disabling or enabling. |
| IsDisposed | Determines whether the current LoggingBackend has been disposed. |
| IsEnabled | Determines whether the current LoggingBackend is currently enabled. This property has precedence over, and does not affect, the minimal log levels set through the SetLevel(LogLevel) method. |
| Options | Gets the formatting and rendering options for the current LoggingBackend. |
| TransactionPolicySelector | Gets or sets the selector that determines what policy to apply for each transaction or whether the transaction should be logged as a transaction at all. |