PostSharp 6.7 / / Post­Sharp Documentation / API Reference / Post­Sharp.​Patterns.​Diagnostics.​Backends.​Multiplexer Namespace / Multiplexer­Backend Class

MultiplexerBackend Class

A multiplexer is a logging backend that sends logging events to other logging backends.
Inheritance Hierarchy
System.Object
  PostSharp.Patterns.Diagnostics.LoggingBackend
    PostSharp.Patterns.Diagnostics.Backends.Multiplexer.MultiplexerBackend

Namespace:  PostSharp.Patterns.Diagnostics.Backends.Multiplexer
Assembly:  PostSharp.Patterns.Diagnostics (in PostSharp.Patterns.Diagnostics.dll) Version: 6.7.12.0 (6.7.12.0)
Syntax
C#
public sealed class MultiplexerBackend : LoggingBackend

The MultiplexerBackend type exposes the following members.

Constructors
  NameDescription
Public methodMultiplexerBackend
Initializes a new multiplexer backend.
Properties
  NameDescription
Public propertyBackends
Gets the child backends.
Public propertyCurrentContext
Gets the current LoggingContext.
(Inherited from LoggingBackend.)
Public propertyCurrentContextLocalConfiguration
Gets the LoggingContextLocalConfiguration for the current execution. Returns DefaultContextLocalConfiguration unless the context has been overwritten by WithContextLocalConfiguration(LoggingContextLocalConfiguration).
(Inherited from LoggingBackend.)
Public propertyDefaultContextLocalConfiguration
Gets the default LoggingContextLocalConfiguration, used unless it has been overwritten by the WithContextLocalConfiguration(LoggingContextLocalConfiguration) for the current execution context.
(Inherited from LoggingBackend.)
Public propertyDefaultVerbosity (Inherited from LoggingBackend.)
Public propertyIsCorrupted
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.
(Inherited from LoggingBackend.)
Public propertyIsDisposed
Determines whether the current LoggingBackend has been disposed.
(Inherited from LoggingBackend.)
Public propertyIsEnabled
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.
(Inherited from LoggingBackend.)
Public propertyOptions
Gets the formatting and rendering options for the current LoggingBackend.
(Inherited from LoggingBackend.)
Methods
  NameDescription
Public methodCreateRecordBuilder
Creates a new LogRecordBuilder.
(Overrides LoggingBackend.CreateRecordBuilder().)
Public methodCreateVerbosityConfiguration
Creates a new LoggingVerbosityConfiguration for the current LoggingBackend.
(Inherited from LoggingBackend.)
Public methodDispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
(Inherited from LoggingBackend.)
Public methodGetAsyncContextOfTask
Gets the AsyncMethodLoggingContext associated with a Task.
(Inherited from LoggingBackend.)
Public methodGetSource(String, String) Obsolete.
Returns a LoggingNamespaceSource for the given role and, optionally, namespace.
(Inherited from LoggingBackend.)
Public methodGetSource(String, Type) Obsolete.
Returns a LoggingTypeSource for the given role and type.
(Inherited from LoggingBackend.)
Public methodGetThreadContext
Returns the ThreadLoggingContext for the current Thread.
(Inherited from LoggingBackend.)
Public methodOpenAsyncContext
Gets an AsyncMethodLoggingContext for a given async method.
(Inherited from LoggingBackend.)
Public methodOpenEphemeralContext(LogMemberInfo)
Gets an EphemeralLoggingContext for use in a given method. An EphemeralLoggingContext is a degenerated kind of context, used to emit a single record.
(Inherited from LoggingBackend.)
Public methodOpenEphemeralContext(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.
(Inherited from LoggingBackend.)
Public methodOpenIteratorContext
Gets an IteratorLoggingContext for a given iterator method.
(Inherited from LoggingBackend.)
Public methodOpenSyncContext
Gets a SyncMethodLoggingContext for a given normal (non-async, non-iterator) method.
(Inherited from LoggingBackend.)
Remarks
You want to use a multiplexer if you want all of your logging to go to two or more different backends.

Each backend, including the multiplexer itself, maintains its own stack of logging contexts.

See Also