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

BaseCollectingTraceListener Class

Base class for TraceListeners that redirect trace events to PostSharp.
Inheritance Hierarchy

Namespace:  PostSharp.Patterns.Diagnostics.Backends.Trace
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 abstract class BaseCollectingTraceListener : TraceListener

The BaseCollectingTraceListener type exposes the following members.

Constructors
  NameDescription
Protected methodBaseCollectingTraceListener
Initializes a new instance of the BaseCollectingTraceListener class
Methods
  NameDescription
Protected methodConvertLevel
Gets the PostSharp log level that corresponds to the given eventType.
Public methodFail
Emits an error message and a detailed error message to the listener you create when you implement the TraceListener class.
(Overrides TraceListener.Fail(String, String).)
Protected methodTraceCore(String, TraceEventType, String)
Sends an event to PostSharp where you provide the text in its final formatted form.
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.
Public methodTraceData(TraceEventCache, String, TraceEventType, Int32, Object)
Writes trace information, a data object and event information to the listener specific output.
(Overrides TraceListener.TraceData(TraceEventCache, String, TraceEventType, Int32, Object).)
Public methodTraceData(TraceEventCache, String, TraceEventType, Int32, Object[])
Writes trace information, an array of data objects and event information to the listener specific output.
(Overrides TraceListener.TraceData(TraceEventCache, String, TraceEventType, Int32, Object[]).)
Public methodTraceEvent(TraceEventCache, String, TraceEventType, Int32)
Writes trace and event information to the listener specific output.
(Overrides TraceListener.TraceEvent(TraceEventCache, String, TraceEventType, Int32).)
Public methodTraceEvent(TraceEventCache, String, TraceEventType, Int32, String)
Writes trace information, a message, and event information to the listener specific output.
(Overrides TraceListener.TraceEvent(TraceEventCache, String, TraceEventType, Int32, String).)
Public methodTraceEvent(TraceEventCache, String, TraceEventType, Int32, String, Object[])
Writes trace information, a formatted array of objects and event information to the listener specific output.
(Overrides TraceListener.TraceEvent(TraceEventCache, String, TraceEventType, Int32, String, Object[]).)
Public methodWrite
When overridden in a derived class, writes the specified message to the listener you create in the derived class.
(Overrides TraceListener.Write(String).)
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.
(Overrides TraceListener.WriteLine(String).)
See Also