SPSolutionResourceUsageLog.LogResourceUsage method (SPSolutionResourceUsageRecord, Boolean)

Logs the specified resource usage record and optionally immediately flushes the log information.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

public static void LogResourceUsage(
	SPSolutionResourceUsageRecord resourceUsageRecord,
	bool forceFlush
)

Parameters

resourceUsageRecord
Type: Microsoft.SharePoint.SPSolutionResourceUsageRecord

The resource usage record to be logged.

forceFlush
Type: System.Boolean

true to immediately flush the log information; otherwise, false.

ExceptionCondition
ArgumentNullException

The resourceUsageRecord parameter is null .

This method first logs the resource usage record represented by the resourceUsageRecord parameter into the cache in the memory. If forceFlush is true, the logs in the cache are immediately flushed from memory and saved into the database; otherwise, the log information is flushed later.

Show: