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

TraceSourceCollectingTraceListener Class

This is a TraceListener that redirects all trace events to PostSharp, using the name of the event source that created the event as the name of the log source to be sent to PostSharp.
Inheritance Hierarchy
System.Object
  System.MarshalByRefObject
    System.Diagnostics.TraceListener
      PostSharp.Patterns.Diagnostics.Backends.Trace.BaseCollectingTraceListener
        PostSharp.Patterns.Diagnostics.Backends.TraceSource.TraceSourceCollectingTraceListener

Namespace:  PostSharp.Patterns.Diagnostics.Backends.TraceSource
Assembly:  PostSharp.Patterns.Diagnostics.Backends.Tracing (in PostSharp.Patterns.Diagnostics.Backends.Tracing.dll) Version: 6.7.12.0 (6.7.12.0)
Syntax
C#
public class TraceSourceCollectingTraceListener : BaseCollectingTraceListener

The TraceSourceCollectingTraceListener type exposes the following members.

Constructors
  NameDescription
Public methodTraceSourceCollectingTraceListener
Initializes a new instance of the TraceSourceCollectingTraceListener 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.)
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