TraceListener.TraceEvent
TraceListener.TraceEvent
TraceListener.TraceEvent
TraceListener.TraceEvent
Method
Definition
Writes trace and event information to the listener specific output.
Overloads
TraceEvent(TraceEventCache, String, TraceEventType, Int32) TraceEvent(TraceEventCache, String, TraceEventType, Int32) TraceEvent(TraceEventCache, String, TraceEventType, Int32) TraceEvent(TraceEventCache, String, TraceEventType, Int32)
Writes trace and event information to the listener specific output.
public:
virtual void TraceEvent(System::Diagnostics::TraceEventCache ^ eventCache, System::String ^ source, System::Diagnostics::TraceEventType eventType, int id);
[System.Runtime.InteropServices.ComVisible(false)]
public virtual void TraceEvent (System.Diagnostics.TraceEventCache eventCache, string source, System.Diagnostics.TraceEventType eventType, int id);
abstract member TraceEvent : System.Diagnostics.TraceEventCache * string * System.Diagnostics.TraceEventType * int -> unit
override this.TraceEvent : System.Diagnostics.TraceEventCache * string * System.Diagnostics.TraceEventType * int -> unit
Public Overridable Sub TraceEvent (eventCache As TraceEventCache, source As String, eventType As TraceEventType, id As Integer)
Parameters
A TraceEventCache object that contains the current process ID, thread ID, and stack trace information.
A name used to identify the output, typically the name of the application that generated the trace event.
One of the TraceEventType values specifying the type of event that has caused the trace.
Remarks
Important
This method is not intended to be called directly by application code but by members of the Debug, Trace, and TraceSource classes to write trace data to output.
The default implementation writes the values of the source
, eventType
and id
parameters as a header. The eventCache
data is written as a footer, the nature of the output data being dependent on the value of the TraceOutputOptions property.
- See also
TraceEvent(TraceEventCache, String, TraceEventType, Int32, String) TraceEvent(TraceEventCache, String, TraceEventType, Int32, String) TraceEvent(TraceEventCache, String, TraceEventType, Int32, String) TraceEvent(TraceEventCache, String, TraceEventType, Int32, String)
Writes trace information, a message, and event information to the listener specific output.
public:
virtual void TraceEvent(System::Diagnostics::TraceEventCache ^ eventCache, System::String ^ source, System::Diagnostics::TraceEventType eventType, int id, System::String ^ message);
[System.Runtime.InteropServices.ComVisible(false)]
public virtual void TraceEvent (System.Diagnostics.TraceEventCache eventCache, string source, System.Diagnostics.TraceEventType eventType, int id, string message);
abstract member TraceEvent : System.Diagnostics.TraceEventCache * string * System.Diagnostics.TraceEventType * int * string -> unit
override this.TraceEvent : System.Diagnostics.TraceEventCache * string * System.Diagnostics.TraceEventType * int * string -> unit
Public Overridable Sub TraceEvent (eventCache As TraceEventCache, source As String, eventType As TraceEventType, id As Integer, message As String)
Parameters
A TraceEventCache object that contains the current process ID, thread ID, and stack trace information.
A name used to identify the output, typically the name of the application that generated the trace event.
One of the TraceEventType values specifying the type of event that has caused the trace.
Remarks
Important
This method is not intended to be called directly by application code but by members of the Debug, Trace, and TraceSource classes to write trace data to output.
The default implementation writes the values of the source
, eventType
and id
parameters as a header, followed by the message
data. The eventCache
data is written as a footer, the nature of the output data being dependent on the value of the TraceOutputOptions property.
- See also
TraceEvent(TraceEventCache, String, TraceEventType, Int32, String, Object[]) TraceEvent(TraceEventCache, String, TraceEventType, Int32, String, Object[]) TraceEvent(TraceEventCache, String, TraceEventType, Int32, String, Object[]) TraceEvent(TraceEventCache, String, TraceEventType, Int32, String, Object[])
Writes trace information, a formatted array of objects and event information to the listener specific output.
public:
virtual void TraceEvent(System::Diagnostics::TraceEventCache ^ eventCache, System::String ^ source, System::Diagnostics::TraceEventType eventType, int id, System::String ^ format, ... cli::array <System::Object ^> ^ args);
[System.Runtime.InteropServices.ComVisible(false)]
public virtual void TraceEvent (System.Diagnostics.TraceEventCache eventCache, string source, System.Diagnostics.TraceEventType eventType, int id, string format, params object[] args);
abstract member TraceEvent : System.Diagnostics.TraceEventCache * string * System.Diagnostics.TraceEventType * int * string * obj[] -> unit
override this.TraceEvent : System.Diagnostics.TraceEventCache * string * System.Diagnostics.TraceEventType * int * string * obj[] -> unit
Public Overridable Sub TraceEvent (eventCache As TraceEventCache, source As String, eventType As TraceEventType, id As Integer, format As String, ParamArray args As Object())
Parameters
A TraceEventCache object that contains the current process ID, thread ID, and stack trace information.
A name used to identify the output, typically the name of the application that generated the trace event.
One of the TraceEventType values specifying the type of event that has caused the trace.
A format string that contains zero or more format items, which correspond to objects in the args
array.
- args
- Object[]
An object
array containing zero or more objects to format.
Remarks
Important
This method is not intended to be called directly by application code but by members of the Debug, Trace, and TraceSource classes to write trace data to output.
The default implementation writes the values of the source
, eventType
and id
parameters as a header. The args
object array is converted to a string using the Format method, passing the format
string and args
array to format the string as the message portion of the trace. The eventCache
data is written as a footer, the nature of the output data being dependent on the value of the TraceOutputOptions property.
- See also
Applies to
Feedback
We'd love to hear your thoughts. Choose the type you'd like to provide:
Our feedback system is built on GitHub Issues. Read more on our blog.
Loading feedback...