TraceListener.TraceEvent メソッド
定義
トレース情報およびイベント情報をリスナー固有の出力に書き込みます。Writes trace and event information to the listener specific output.
オーバーロード
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:
virtual void TraceEvent(System::Diagnostics::TraceEventCache ^ eventCache, System::String ^ source, System::Diagnostics::TraceEventType eventType, int id);
public virtual void TraceEvent (System.Diagnostics.TraceEventCache? eventCache, string source, System.Diagnostics.TraceEventType eventType, int id);
public virtual void TraceEvent (System.Diagnostics.TraceEventCache eventCache, 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
[<System.Runtime.InteropServices.ComVisible(false)>]
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)
パラメーター
- eventCache
- TraceEventCache
現在のプロセス ID、スレッド ID、およびスタック トレース情報を格納している 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
トレースを発生させたイベントのタイプを指定する TraceEventType 値の 1 つ。One of the TraceEventType values specifying the type of event that has caused the trace.
- id
- Int32
イベントの数値識別子。A numeric identifier for the event.
- 属性
注釈
重要
このメソッドは、アプリケーションコードで直接呼び出すためのものではなく、、、およびクラスのメンバーによって Debug 、 Trace TraceSource 出力するトレースデータを書き込むためのものです。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.
既定の実装では、、、およびの各パラメーターの値が source
eventType
id
ヘッダーとして書き込まれます。The default implementation writes the values of the source
, eventType
and id
parameters as a header. データは、 eventCache
プロパティの値に依存している出力データの性質であるフッターとして書き込まれ TraceOutputOptions ます。The eventCache
data is written as a footer, the nature of the output data being dependent on the value of the TraceOutputOptions property.
こちらもご覧ください
- TraceListener
- DefaultTraceListener
- ConsoleTraceListener
- EventLogTraceListener
- TextWriterTraceListener
- Debug
- Trace
適用対象
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);
public virtual void TraceEvent (System.Diagnostics.TraceEventCache eventCache, string? source, System.Diagnostics.TraceEventType eventType, int id, string message);
public virtual void TraceEvent (System.Diagnostics.TraceEventCache eventCache, string source, System.Diagnostics.TraceEventType eventType, int id, 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
[<System.Runtime.InteropServices.ComVisible(false)>]
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)
パラメーター
- eventCache
- TraceEventCache
現在のプロセス ID、スレッド ID、およびスタック トレース情報を格納している 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
トレースを発生させたイベントのタイプを指定する TraceEventType 値の 1 つ。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.
- 属性
注釈
重要
このメソッドは、アプリケーションコードで直接呼び出すためのものではなく、、、およびクラスのメンバーによって Debug 、 Trace TraceSource 出力するトレースデータを書き込むためのものです。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.
既定の実装では、、、およびの各パラメーターの値がヘッダーとして書き込まれ、その source
eventType
id
後にデータが書き込まれ message
ます。The default implementation writes the values of the source
, eventType
and id
parameters as a header, followed by the message
data. データは、 eventCache
プロパティの値に依存している出力データの性質であるフッターとして書き込まれ TraceOutputOptions ます。The eventCache
data is written as a footer, the nature of the output data being dependent on the value of the TraceOutputOptions property.
こちらもご覧ください
- TraceListener
- DefaultTraceListener
- ConsoleTraceListener
- EventLogTraceListener
- TextWriterTraceListener
- Debug
- Trace
適用対象
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);
public virtual void TraceEvent (System.Diagnostics.TraceEventCache? eventCache, string source, System.Diagnostics.TraceEventType eventType, int id, string format, params object[]? args);
public virtual void TraceEvent (System.Diagnostics.TraceEventCache eventCache, string source, System.Diagnostics.TraceEventType eventType, int id, string format, params 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
[<System.Runtime.InteropServices.ComVisible(false)>]
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())
パラメーター
- eventCache
- TraceEventCache
現在のプロセス ID、スレッド ID、およびスタック トレース情報を格納している 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
トレースを発生させたイベントのタイプを指定する TraceEventType 値の 1 つ。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
0 個以上の書式項目を格納している書式指定文字列。args
配列内のオブジェクトに対応します。A format string that contains zero or more format items, which correspond to objects in the args
array.
- args
- Object[]
0 個以上の書式設定対象オブジェクトを含んだ object
配列。An object
array containing zero or more objects to format.
- 属性
注釈
重要
このメソッドは、アプリケーションコードで直接呼び出すためのものではなく、、、およびクラスのメンバーによって Debug 、 Trace TraceSource 出力するトレースデータを書き込むためのものです。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.
既定の実装では、、、およびの各パラメーターの値が source
eventType
id
ヘッダーとして書き込まれます。The default implementation writes the values of the source
, eventType
and id
parameters as a header. args
オブジェクト配列は、メソッドを使用して文字列に変換され Format 、文字列と配列を渡して、 format
args
トレースのメッセージ部分として文字列の書式を設定します。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. データは、 eventCache
プロパティの値に依存している出力データの性質であるフッターとして書き込まれ TraceOutputOptions ます。The eventCache
data is written as a footer, the nature of the output data being dependent on the value of the TraceOutputOptions property.
こちらもご覧ください
- TraceListener
- DefaultTraceListener
- ConsoleTraceListener
- EventLogTraceListener
- TextWriterTraceListener
- Debug
- Trace