Logging 类

提供跟踪日志记录功能。

internal class Logging

警告

此类是内部类,不应直接在代码中使用。

Microsoft在任何情况下都不支持在生产应用程序中使用此类。

Associate 方法

记录两个对象相互关联的信息。

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

    要记录到跟踪源的入口消息。

异常方法

记录异常并还原缩进。

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)