Logging 類別

提供追蹤記錄功能。

internal class Logging

警告

這是內部類別,所以無法直接用於程式碼。

Microsoft 在任何情況下都不支援在實際執行應用程式中使用此類別。

關聯方法

兩個物件彼此相關聯的記錄資訊。

internal static void Associate(TraceSource traceSource, object objA, object objB)

參數

  • traceSource TraceSource

    要記錄事件的追蹤來源。

  • objA Object

    要與 objB 建立關聯的物件。

  • objB Object

    要與 objA 建立關聯的物件。

Enter(TraceSource, object, string, string) 方法

記錄進入方法。

internal static void Enter(TraceSource traceSource, object obj, string method, string param)

參數

  • traceSource TraceSource

    要記錄事件的追蹤來源。

  • obj Object

    要呼叫方法的物件。

  • method String

    正在進入的方法。

  • param String

    傳遞至方法的參數。

Enter(TraceSource, object, string, object) 方法

記錄進入方法。

internal static void Enter(TraceSource traceSource, object obj, string method, object paramObject)

參數

  • traceSource TraceSource

    要記錄事件的追蹤來源。

  • obj Object

    要呼叫方法的物件。

  • method String

    正在進入的方法。

  • paramObject Object

    傳遞至方法的參數。

Enter(TraceSource, string, string, string) 方法

記錄進入方法。

internal static void Enter(TraceSource traceSource, string obj, string method, string param)

參數

  • traceSource TraceSource

    要記錄事件的追蹤來源。

  • obj String

    要呼叫方法的物件。

  • method String

    正在進入的方法。

  • param String

    傳遞至方法的參數。

Enter(TraceSource, string, string, object) 方法

記錄進入方法。

internal static void Enter(TraceSource traceSource, string obj, string method, object paramObject)

參數

  • traceSource TraceSource

    要記錄事件的追蹤來源。

  • obj String

    要呼叫方法的物件。

  • method String

    正在進入的方法。

  • paramObject Object

    傳遞至方法的參數。

Enter(TraceSource, string, string) 方法

記錄進入方法。

internal static void Enter(TraceSource traceSource, string method, string parameters)

參數

  • traceSource TraceSource

    要記錄事件的追蹤來源。

  • method String

    正在進入的方法。

  • parameters String

    傳遞至方法的參數。

Enter(TraceSource, string) 方法

記錄進入方法。

internal static void Enter(TraceSource traceSource, string msg)

參數

  • traceSource TraceSource

    要記錄事件的追蹤來源。

  • msg String

    要記錄到追蹤來源的進入訊息。

Exception 方法

記錄例外狀況並還原縮排。

internal static void Exception(TraceSource traceSource, object obj, string method, Exception e)

參數

  • traceSource TraceSource

    要記錄事件的追蹤來源。

  • obj Object

    呼叫擲回例外狀況的方法的物件。

  • method String

    擲回例外狀況的方法。

  • e Exception

    已擲回的例外狀況。

Exit(TraceSource, object, string, object) 方法

記錄離開函式。

internal static void Exit(TraceSource traceSource, object obj, string method, object retObject)

參數

  • traceSource TraceSource

    要記錄事件的追蹤來源。

  • obj Object

    要呼叫方法的物件。

  • method String

    正在離開的方法。

  • retObject Object

    方法正在傳回的值。

Exit(TraceSource, string, string, object) 方法

記錄離開函式。

internal static void Exit(TraceSource traceSource, string obj, string method, object retObject)

參數

  • traceSource TraceSource

    要記錄事件的追蹤來源。

  • obj String

    要呼叫方法的物件。

  • method String

    正在離開的方法。

  • retObject Object

    方法正在傳回的值。

Exit(TraceSource, object, string, string) 方法

記錄離開函式。

internal static void Exit(TraceSource traceSource, object obj, string method, string retValue)

參數

  • traceSource TraceSource

    要記錄事件的追蹤來源。

  • obj Object

    要呼叫方法的物件。

  • method String

    正在離開的方法。

  • retValue String

    方法正在傳回的值。

Exit(TraceSource, string, string, string) 方法

記錄離開函式。

internal static void Exit(TraceSource traceSource, string obj, string method, string retValue)

參數

  • traceSource TraceSource

    要記錄事件的追蹤來源。

  • obj String

    要呼叫方法的物件。

  • method String

    正在離開的方法。

  • retValue String

    方法正在傳回的值。

Exit(TraceSource, string, string) 方法

記錄離開函式。

internal static void Exit(TraceSource traceSource, string method, string parameters)

參數

  • traceSource TraceSource

    要記錄事件的追蹤來源。

  • method String

    正在離開的方法。

  • parameters String

    傳遞至即將結束之方法的參數。

Exit(TraceSource, string) 方法

記錄離開函式。

internal static void Exit(TraceSource traceSource, string msg)

參數

  • traceSource TraceSource

    要記錄事件的追蹤來源。

  • msg String

    要記錄到追蹤來源的結束訊息。

Http 屬性

取得 "System.Net.Http" 的追蹤來源。

internal static TraceSource Http { get; }

屬性值

TraceSource
"System.Net.Http" 的追蹤來源,如果未啟用記錄,則為 null

On 屬性

取得值,這個值表示是否啟用記錄。

internal static bool On { get; }

屬性值

Boolean
如果啟用記錄則為 true,否則為 false

需求

命名空間︰System.Net

組件:系統 (在 System.dll 內)