Open sandboxFocus

Class DiagnosticSourceCollectingListener

Subscribes to DiagnosticListener and emits messages and activities to PostSharp Logging. After calling the constructor, you must call the FollowActivity(string, IDiagnosticSourceActivityFilter) and then Subscribe() methods to start listening to events.

Inheritance
DiagnosticSourceCollectingListener
Namespace: PostSharp.Patterns.Diagnostics.Adapters.DiagnosticSource
Assembly: PostSharp.Patterns.Diagnostics.Adapters.DiagnosticSource.dll
Syntax
public sealed class DiagnosticSourceCollectingListener : IObserver<DiagnosticListener>, IDisposable

Constructors

Name Description
DiagnosticSourceCollectingListener(LogLevel)

Initializes a new DiagnosticSourceCollectingListener and subscribes to all sources.

DiagnosticSourceCollectingListener(string[], LogLevel)

Initializes a new DiagnosticSourceCollectingListener and specifies the list of sources to follow.

Methods

Name Description
Dispose()
FollowActivity(string, IDiagnosticSourceActivityFilter)

Follows a specific activity.

Subscribe()

Subscribes to event sources.