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)
Available in Sandboxed Solutions: No
Syntax
'Declaration
Public Shared Sub LogResourceUsage ( _
resourceUsageRecord As SPSolutionResourceUsageRecord, _
forceFlush As Boolean _
)
'Usage
Dim resourceUsageRecord As SPSolutionResourceUsageRecord
Dim forceFlush As BooleanSPSolutionResourceUsageLog.LogResourceUsage(resourceUsageRecord, _
forceFlush)
public static void LogResourceUsage(
SPSolutionResourceUsageRecord resourceUsageRecord,
bool forceFlush
)
Parameters
resourceUsageRecord
Type: Microsoft.SharePoint.SPSolutionResourceUsageRecordThe resource usage record to be logged.
forceFlush
Type: System.Booleantrue to immediately flush the log information; otherwise, false.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | The resourceUsageRecord parameter is null . |
Remarks
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.
See Also
Reference
SPSolutionResourceUsageLog Class