Upravit

Sdílet prostřednictvím


IisTraceListener.TraceEvent Method

Definition

Writes trace and event information to the output of the IisTraceListener class.

Overloads

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

Writes trace and event information to the output of the IisTraceListener class.

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

Writes trace information, a formatted array of objects, and event information to the output of the IisTraceListener class.

Remarks

TraceEvent is introduced in the .NET Framework 3.5. For more information, see Versions and Dependencies.

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

Writes trace and event information to the output of the IisTraceListener class.

public:
 override void TraceEvent(System::Diagnostics::TraceEventCache ^ eventCache, System::String ^ source, System::Diagnostics::TraceEventType severity, int id, System::String ^ message);
public override void TraceEvent (System.Diagnostics.TraceEventCache eventCache, string source, System.Diagnostics.TraceEventType severity, int id, string message);
override this.TraceEvent : System.Diagnostics.TraceEventCache * string * System.Diagnostics.TraceEventType * int * string -> unit
Public Overrides Sub TraceEvent (eventCache As TraceEventCache, source As String, severity 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 that identifies the output. This is typically the name of the application that generated the trace event.

severity
TraceEventType

A TraceEventType value that specifies the type of event that caused the trace.

id
Int32

A numeric identifier for the event.

message
String

A message to write.

Remarks

This method is not intended to be called directly by application code. The members of the System.Diagnostics.Debug, System.Diagnostics.Trace, and System.Diagnostics.TraceSource classes use this method to write trace data.

TraceEvent is introduced in the .NET Framework 3.5. For more information, see Versions and Dependencies.

Applies to

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

Writes trace information, a formatted array of objects, and event information to the output of the IisTraceListener class.

public:
 override void TraceEvent(System::Diagnostics::TraceEventCache ^ eventCache, System::String ^ source, System::Diagnostics::TraceEventType severity, int id, System::String ^ format, ... cli::array <System::Object ^> ^ args);
public override void TraceEvent (System.Diagnostics.TraceEventCache eventCache, string source, System.Diagnostics.TraceEventType severity, int id, string format, params object[] args);
override this.TraceEvent : System.Diagnostics.TraceEventCache * string * System.Diagnostics.TraceEventType * int * string * obj[] -> unit
Public Overrides Sub TraceEvent (eventCache As TraceEventCache, source As String, severity 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 that identifies the output. This is typically the name of the application that generated the trace event.

severity
TraceEventType

A TraceEventType value that specifies the type of event that caused the trace.

id
Int32

A numeric identifier for the event.

format
String

A format string that contains zero or more format items that correspond to objects in the args array.

args
Object[]

An object array that contains zero or more objects to format.

Remarks

This method is not intended to be called directly by application code. The members of the System.Diagnostics.Debug, System.Diagnostics.Trace, and System.Diagnostics.TraceSource classes use this method to write trace data.

TraceEvent is introduced in the .NET Framework 3.5. For more information, see Versions and Dependencies.

Applies to