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.
Namespace: PostSharp.Patterns.Diagnostics.Adapters.DiagnosticSource
Assembly: PostSharp.Patterns.Diagnostics.Adapters.DiagnosticSource.dll
Syntax
public sealed class DiagnosticSourceCollectingListener : IObserver<DiagnosticListener>, IDisposableConstructors
| Name | Description |
|---|---|
| DiagnosticSourceCollectingListener(LogLevel) | Initializes a new instance of the DiagnosticSourceCollectingListener class and subscribes to all sources. |
| DiagnosticSourceCollectingListener(string[], LogLevel) | Initializes a new instance of the DiagnosticSourceCollectingListener class and specifies the list of sources to follow. |
Methods
| Name | Description |
|---|---|
| Dispose() | |
| FollowActivity(string, IDiagnosticSourceActivityFilter) | Follows a specific activity. |
| Subscribe() | Subscribes to event sources. |