Open sandboxFocus

Class TraceCollectingTraceListener

This class is a trace listener that sends all events to PostSharp as the log source "TraceCollectingTraceListener".

Inheritance
TraceCollectingTraceListener
Implements
Namespace: PostSharp.Patterns.Diagnostics.Backends.Trace
Assembly: PostSharp.Patterns.Diagnostics.Backends.Tracing.dll
Syntax
public class TraceCollectingTraceListener : BaseCollectingTraceListener, IDisposable

Constructors

Name Description
TraceCollectingTraceListener()

Initializes a new instance of this class.

Methods

Name Description
RedirectLoggingToPostSharp()

Redirects all Trace events to be sent to PostSharp and clears all other listeners from Listeners. Those listeners are returned in the return value.

TraceCore(string, TraceEventType, string)

Sends an event to PostSharp where you provide the text in its final formatted form.

TraceCore(string, TraceEventType, string, object[])

Sends an event to PostSharp where the text is provided as a formatting string and an array of parameters.