共用方式為


SPSolutionResourceUsageLog.LogResourceUsage method (SPSolutionResourceUsageRecord, Boolean)

記錄指定的資源使用狀況記錄,並選擇性地立即清除記錄檔資訊。

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

Syntax

'宣告
Public Shared Sub LogResourceUsage ( _
    resourceUsageRecord As SPSolutionResourceUsageRecord, _
    forceFlush As Boolean _
)
'用途
Dim resourceUsageRecord As SPSolutionResourceUsageRecord
Dim forceFlush As BooleanSPSolutionResourceUsageLog.LogResourceUsage(resourceUsageRecord, _
    forceFlush)
public static void LogResourceUsage(
    SPSolutionResourceUsageRecord resourceUsageRecord,
    bool forceFlush
)

參數

  • forceFlush
    Type: System.Boolean

    若要立即清除記錄檔資訊 ; true否則, false。

Exceptions

Exception Condition
ArgumentNullException

resourceUsageRecord參數是 null 。

備註

這個方法首先會記錄由resourceUsageRecord參數到記憶體中快取的資源使用狀況記錄。如果forceFlush是true,快取中的記錄檔是立即從記憶體排清,並且儲存到資料庫。否則,被稍後清除記錄檔資訊。

請參閱

參照

SPSolutionResourceUsageLog class

SPSolutionResourceUsageLog members

LogResourceUsage overload

Microsoft.SharePoint namespace