共用方式為


SPCriticalTraceCounter.Initialize Method

Enabling this monitor will automatically launch the developer dashboard, which will activate the [Microsoft.SharePoint.Diagnostics.ULS.SendTraceToHttpContext] callback which will let this monitor collect the critical trace.

Namespace:  Microsoft.SharePoint.Utilities
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online

Syntax

'Declaration
Public Shared Sub Initialize
'Usage

SPCriticalTraceCounter.Initialize()
public static void Initialize()

See Also

Reference

SPCriticalTraceCounter Class

SPCriticalTraceCounter Members

Initialize Overload

Microsoft.SharePoint.Utilities Namespace