PostSharp 6.9 / / Post­Sharp Documentation / API Reference / Post­Sharp.​Patterns.​Diagnostics.​Backends.​Trace Namespace / Trace­Collecting­Trace­Listener Class

TraceCollectingTraceListener Class

This class is a trace listener that sends all events to PostSharp as the log source "TraceCollectingTraceListener".
Inheritance Hierarchy
System.Object
  System.MarshalByRefObject
    System.Diagnostics.TraceListener
      PostSharp.Patterns.Diagnostics.Backends.Trace.BaseCollectingTraceListener
        PostSharp.Patterns.Diagnostics.Backends.Trace.TraceCollectingTraceListener

Namespace:  PostSharp.Patterns.Diagnostics.Backends.Trace
Assembly:  PostSharp.Patterns.Diagnostics.Backends.Tracing (in PostSharp.Patterns.Diagnostics.Backends.Tracing.dll) Version: 6.9.11.0 (6.9.11.0)
Syntax
C#
public class TraceCollectingTraceListener : BaseCollectingTraceListener

The TraceCollectingTraceListener type exposes the following members.

Constructors
  NameDescription
Public methodTraceCollectingTraceListener
Initializes a new instance of this class.
Methods
  NameDescription
Protected methodConvertLevel
Gets the PostSharp log level that corresponds to the given eventType.
(Inherited from BaseCollectingTraceListener.)
Public methodFail
Emits an error message and a detailed error message to the listener you create when you implement the TraceListener class.
(Inherited from BaseCollectingTraceListener.)
Public methodStatic memberRedirectLoggingToPostSharp
Redirects all Trace events to be sent to PostSharp and clears all other listeners from Listeners. Those listeners are returned in the return value.
Protected methodTraceCore(String, TraceEventType, String)
Sends an event to PostSharp where you provide the text in its final formatted form.
(Overrides BaseCollectingTraceListener.TraceCore(String, TraceEventType, String).)
Protected methodTraceCore(String, TraceEventType, String, Object[])
Sends an event to PostSharp where the text is provided as a formatting string and an array of parameters.
(Overrides BaseCollectingTraceListener.TraceCore(String, TraceEventType, String, Object[]).)
Public methodTraceData(TraceEventCache, String, TraceEventType, Int32, Object)
Writes trace information, a data object and event information to the listener specific output.
(Inherited from BaseCollectingTraceListener.)
Public methodTraceData(TraceEventCache, String, TraceEventType, Int32, Object[])
Writes trace information, an array of data objects and event information to the listener specific output.
(Inherited from BaseCollectingTraceListener.)
Public methodTraceEvent(TraceEventCache, String, TraceEventType, Int32)
Writes trace and event information to the listener specific output.
(Inherited from BaseCollectingTraceListener.)
Public methodTraceEvent(TraceEventCache, String, TraceEventType, Int32, String)
Writes trace information, a message, and event information to the listener specific output.
(Inherited from BaseCollectingTraceListener.)
Public methodTraceEvent(TraceEventCache, String, TraceEventType, Int32, String, Object[])
Writes trace information, a formatted array of objects and event information to the listener specific output.
(Inherited from BaseCollectingTraceListener.)
Public methodWrite
When overridden in a derived class, writes the specified message to the listener you create in the derived class.
(Inherited from BaseCollectingTraceListener.)
Public methodWriteLine
When overridden in a derived class, writes a message to the listener you create in the derived class, followed by a line terminator.
(Inherited from BaseCollectingTraceListener.)
See Also