This topic has not yet been rated - Rate this topic

SPCriticalTraceCounter.AddDataToScope Method

SharePoint 2010

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
public static void AddDataToScope(
	uint tagID,
	string category,
	int traceLevel,
	string message
)

Parameters

tagID
Type: System.UInt32
A uint tag identifier.
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.
message
Type: System.String
A System.String

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.

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ
TraceLevel
The values for traceLevel are as follows:

1 Critical
4 Exception (Watson)
6 Assert
8 Warning
10 Unexpected
15 Monitorable

A per Paul Andrew: http://blogs.msdn.com/b/pandrew/archive/2010/03/26/sharepoint-2010-developer-dashboard-for-debugging-code.aspx