STrace.Trace 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
使用默认跟踪级别跟踪组件。
重载
Trace(String, String) |
使用默认跟踪级别跟踪组件。 |
Trace(String, String, Object[]) |
使用默认跟踪级别跟踪组件,并记录方法的输入参数。 |
Trace(String, UInt32, String) |
使用指定的跟踪级别跟踪。 |
Trace(String, UInt32, String, Object[]) |
使用指定的跟踪级别跟踪组件,并指定要格式化的输入参数。 |
注解
标识为仅供参考。 不支持。 不保证以后的兼容性。
Trace(String, String)
使用默认跟踪级别跟踪组件。
public:
static void Trace(System::String ^ strComponentName, System::String ^ strLine);
[System.Diagnostics.Conditional("TRACE")]
public static void Trace (string strComponentName, string strLine);
[<System.Diagnostics.Conditional("TRACE")>]
static member Trace : string * string -> unit
Public Shared Sub Trace (strComponentName As String, strLine As String)
参数
- strComponentName
- String
组件名称。
- strLine
- String
为跟踪事件发出的消息。 该消息通常发送到日志文件。
- 属性
注解
标识为仅供参考。 不支持。 不保证以后的兼容性。
适用于
Trace(String, String, Object[])
使用默认跟踪级别跟踪组件,并记录方法的输入参数。
public:
static void Trace(System::String ^ strComponentName, System::String ^ strFormat, ... cli::array <System::Object ^> ^ arg);
[System.Diagnostics.Conditional("TRACE")]
public static void Trace (string strComponentName, string strFormat, params object[] arg);
[<System.Diagnostics.Conditional("TRACE")>]
static member Trace : string * string * obj[] -> unit
Public Shared Sub Trace (strComponentName As String, strFormat As String, ParamArray arg As Object())
参数
- strComponentName
- String
组件名称。
- strFormat
- String
格式字符串。
- arg
- Object[]
要格式化的输入参数。
- 属性
注解
标识为仅供参考。 不支持。 不保证以后的兼容性。
适用于
Trace(String, UInt32, String)
使用指定的跟踪级别跟踪。
public:
static void Trace(System::String ^ strComponentName, System::UInt32 nLevel, System::String ^ strLine);
[System.Diagnostics.Conditional("TRACE")]
public static void Trace (string strComponentName, uint nLevel, string strLine);
[<System.Diagnostics.Conditional("TRACE")>]
static member Trace : string * uint32 * string -> unit
Public Shared Sub Trace (strComponentName As String, nLevel As UInteger, strLine As String)
参数
- strComponentName
- String
组件名称。
- nLevel
- UInt32
跟踪级别。
- strLine
- String
为跟踪事件发出的消息。 该消息通常发送到日志文件。
- 属性
注解
标识为仅供参考。 不支持。 不保证以后的兼容性。
适用于
Trace(String, UInt32, String, Object[])
使用指定的跟踪级别跟踪组件,并指定要格式化的输入参数。
public:
static void Trace(System::String ^ strComponentName, System::UInt32 nLevel, System::String ^ strFormat, ... cli::array <System::Object ^> ^ arg);
[System.Diagnostics.Conditional("TRACE")]
public static void Trace (string strComponentName, uint nLevel, string strFormat, params object[] arg);
[<System.Diagnostics.Conditional("TRACE")>]
static member Trace : string * uint32 * string * obj[] -> unit
Public Shared Sub Trace (strComponentName As String, nLevel As UInteger, strFormat As String, ParamArray arg As Object())
参数
- strComponentName
- String
组件名称。
- nLevel
- UInt32
跟踪级别。
- strFormat
- String
格式字符串。
- arg
- Object[]
要格式化的输入参数。
- 属性
注解
标识为仅供参考。 不支持。 不保证以后的兼容性。