LoggingBackend Class |
PostSharp.Patterns.Diagnostics.LoggingBackend
PostSharp.Patterns.Diagnostics.Backends.Multiplexer.MultiplexerBackend
PostSharp.Patterns.Diagnostics.Backends.Null.NullLoggingBackend
PostSharp.Patterns.Diagnostics.Backends.TextLoggingBackend
Namespace: PostSharp.Patterns.Diagnostics
Assembly: PostSharp.Patterns.Diagnostics (in PostSharp.Patterns.Diagnostics.dll) Version: 6.9.11.0 (6.9.11.0)
public abstract class LoggingBackend : IDisposable
The LoggingBackend type exposes the following members.
Name | Description | |
---|---|---|
LoggingBackend |
Initializes a new LoggingBackend.
|
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.
|
Name | Description | |
---|---|---|
CreateAsyncCustomActivityContext |
Creates a new AsyncCustomActivityLoggingContext.
| |
CreateAsyncMethodContext |
Creates a new AsyncMethodLoggingContext for a given async method.
| |
CreateContextLocalConfiguration |
Creates a new LoggingContextLocalConfiguration.
| |
CreateEphemeralContext |
Creates a new EphemeralLoggingContext.
| |
CreateExecutionContextData |
Creates a new empty instance of ExecutionContextData possibly of a subclass which can hold backend-specific data.
| |
CreateIteratorContext |
Creates a new IteratorLoggingContext for a given iterator method.
| |
CreateRecordBuilder |
Creates a new LogRecordBuilder.
| |
CreateSyncCustomActivityContext |
Creates a new SyncCustomActivityLoggingContext.
| |
CreateSyncMethodContext |
Creates a new SyncMethodLoggingContext for a given normal (non-async, non-iterator) method.
| |
CreateThreadContext |
Creates a new ThreadLoggingContext.
| |
CreateTransaction |
Creates a LoggingTransaction instance.
| |
CreateTypeSource |
Creates a LoggingTypeSource for the given role and type.
| |
CreateTypeSourceBySourceName |
Creates a LoggingTypeSource for the given role and logger name.
| |
CreateVerbosityConfiguration |
Creates a new LoggingVerbosityConfiguration for the current LoggingBackend.
| |
Dispose() | Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. | |
Dispose(Boolean) |
Disposes the current object.
| |
GetAsyncContextOfTask |
Gets the AsyncMethodLoggingContext associated with a Task.
| |
GetBackendOptions |
Gets the formatting and rendering options for the current LoggingBackend.
| |
GetSource(String, String) | Obsolete.
Returns a LoggingNamespaceSource for the given role and, optionally, namespace.
| |
GetSource(String, Type) | Obsolete.
Returns a LoggingTypeSource for the given role and type.
| |
GetThreadContext |
Returns the ThreadLoggingContext for the current Thread.
| |
OpenAsyncContext |
Gets an AsyncMethodLoggingContext for a given async method.
| |
OpenEphemeralContext(LogMemberInfo) |
Gets an EphemeralLoggingContext for use in a given method. An EphemeralLoggingContext is a degenerated
kind of context, used to emit a single record.
| |
OpenEphemeralContext(LoggingTypeSource, ThreadLoggingContext) |
Gets an EphemeralLoggingContext for use in a given LoggingTypeSource. An EphemeralLoggingContext is a degenerated
kind of context, used to emit a single record.
| |
OpenIteratorContext |
Gets an IteratorLoggingContext for a given iterator method.
| |
OpenSyncContext |
Gets a SyncMethodLoggingContext for a given normal (non-async, non-iterator) method.
| |
ToString | Returns a string that represents the current object. (Overrides Object.ToString().) | |
WithContextLocalConfiguration |
Changes the LoggingContextLocalConfiguration for the current execution context.
| |
WithVerbosityConfiguration |
Changes the verbosity for the current execution context.
|
Name | Description | |
---|---|---|
ConfigureFromXml(XDocument, Boolean) | Overloaded.
Configures a LoggingBackend from an XDocument.
(Defined by LoggingConfigurationManager.) | |
ConfigureFromXml(XElement, Boolean) | Overloaded.
Configures a LoggingBackend from an XElement.
(Defined by LoggingConfigurationManager.) | |
ConfigureFromXmlAsync |
Configures a LoggingBackend from an XML configuration file whose location is specified in a Uri.
(Defined by LoggingConfigurationManager.) | |
ConfigureFromXmlWithAutoReloadAsync |
Configures a LoggingBackend from an XML configuration file whose location is specified in a Uri
and specifies a TimeSpan at which the file should be refreshed from source.
(Defined by LoggingConfigurationManager.) | |
ResetConfiguration | (Defined by LoggingConfigurationManager.) | |
StopAutoReloadConfigurationAsync |
Stops all auto-refresh configuration set up by ConfigureFromXmlWithAutoReloadAsync(LoggingBackend, Uri, TimeSpan, CancellationToken)
and waits until all pending operations have completed.
(Defined by LoggingConfigurationManager.) |
If you want to implement your own logging back-end, deriving from the TextLoggingBackend class, which implements standard logic for logging a text.