Rediger

Del via


EventProviderTraceListener.TraceEvent Method

Definition

Overloads

TraceEvent(TraceEventCache, String, TraceEventType, Int32)

Writes trace and event information to the listener specific output.

TraceEvent(TraceEventCache, String, TraceEventType, Int32, String)

Writes trace information, a message, and event information to the listener specific output.

TraceEvent(TraceEventCache, String, TraceEventType, Int32, String, Object[])

Writes trace information, a formatted array of objects and event information to the listener specific output.

TraceEvent(TraceEventCache, String, TraceEventType, Int32)

Writes trace and event information to the listener specific output.

public:
 override void TraceEvent(System::Diagnostics::TraceEventCache ^ eventCache, System::String ^ source, System::Diagnostics::TraceEventType eventType, int id);
public override sealed void TraceEvent (System.Diagnostics.TraceEventCache eventCache, string source, System.Diagnostics.TraceEventType eventType, int id);
override this.TraceEvent : System.Diagnostics.TraceEventCache * string * System.Diagnostics.TraceEventType * int -> unit
Public Overrides NotOverridable Sub TraceEvent (eventCache As TraceEventCache, source As String, eventType As TraceEventType, id As Integer)

Parameters

eventCache
TraceEventCache

A TraceEventCache object that contains the current process ID, thread ID, and stack trace information.

source
String

A name used to identify the output, typically the name of the application that generated the trace event.

eventType
TraceEventType

One of the TraceEventType values specifying the type of event that has caused the trace.

id
Int32

A numeric identifier for the event.

See also

Applies to

TraceEvent(TraceEventCache, String, TraceEventType, Int32, String)

Writes trace information, a message, and event information to the listener specific output.

public:
 override void TraceEvent(System::Diagnostics::TraceEventCache ^ eventCache, System::String ^ source, System::Diagnostics::TraceEventType eventType, int id, System::String ^ message);
public override sealed void TraceEvent (System.Diagnostics.TraceEventCache eventCache, string source, System.Diagnostics.TraceEventType eventType, int id, string message);
override this.TraceEvent : System.Diagnostics.TraceEventCache * string * System.Diagnostics.TraceEventType * int * string -> unit
Public Overrides NotOverridable Sub TraceEvent (eventCache As TraceEventCache, source As String, eventType As TraceEventType, id As Integer, message As String)

Parameters

eventCache
TraceEventCache

A TraceEventCache object that contains the current process ID, thread ID, and stack trace information.

source
String

A name used to identify the output, typically the name of the application that generated the trace event.

eventType
TraceEventType

One of the TraceEventType values specifying the type of event that has caused the trace.

id
Int32

A numeric identifier for the event.

message
String

A message to write.

See also

Applies to

TraceEvent(TraceEventCache, String, TraceEventType, Int32, String, Object[])

Writes trace information, a formatted array of objects and event information to the listener specific output.

public:
 override void TraceEvent(System::Diagnostics::TraceEventCache ^ eventCache, System::String ^ source, System::Diagnostics::TraceEventType eventType, int id, System::String ^ format, ... cli::array <System::Object ^> ^ args);
public override sealed void TraceEvent (System.Diagnostics.TraceEventCache eventCache, string source, System.Diagnostics.TraceEventType eventType, int id, string format, params object[] args);
override this.TraceEvent : System.Diagnostics.TraceEventCache * string * System.Diagnostics.TraceEventType * int * string * obj[] -> unit
Public Overrides NotOverridable Sub TraceEvent (eventCache As TraceEventCache, source As String, eventType As TraceEventType, id As Integer, format As String, ParamArray args As Object())

Parameters

eventCache
TraceEventCache

A TraceEventCache object that contains the current process ID, thread ID, and stack trace information.

source
String

A name used to identify the output, typically the name of the application that generated the trace event.

eventType
TraceEventType

One of the TraceEventType values specifying the type of event that has caused the trace.

id
Int32

A numeric identifier for the event.

format
String

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.

See also

Applies to