共用方式為


SPCriticalTraceCounter.AddDataToScope Method

Saves the specified critical trace information in the context for later reporting.

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 AddDataToScope ( _
    tagID As UInteger, _
    category As String, _
    traceLevel As Integer, _
    message As String _
)
'Usage
Dim tagID As UInteger
Dim category As String
Dim traceLevel As Integer
Dim message As StringSPCriticalTraceCounter.AddDataToScope(tagID, category, _
    traceLevel, message)
public static void AddDataToScope(
    uint tagID,
    string category,
    int traceLevel,
    string message
)

Parameters

  • category
    Type: System.String

    A System.String representation of the trace category.

  • traceLevel
    Type: System.Int32

    A System.Int32 of the trace level of the event.

Remarks

If the tag identifier matches one of the values in [SPDeveloperDashboardSettings.AdditionalEventsToTrack] this instance will be treated as a critical trace, regardless of verbosity level.

See Also

Reference

SPCriticalTraceCounter Class

SPCriticalTraceCounter Members

Microsoft.SharePoint.Utilities Namespace