다음을 통해 공유


SPGlobalAdmin.SetLogThreshold method

NOTE: This API is now obsolete.

Use the SetAll(TraceSeverity) method of the SPDiagnosticsService class instead. (In Windows SharePoint Services 2.0 the SetLogThreshold method got a logging threshold value that specified the highest level for which messages are logged in the SharePoint Foundation error log, and is maintained for backward compatibility.)

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

Syntax

'Declaration
<ObsoleteAttribute("Use the SPDiagnosticsService.SetAll(TraceSeverity) api instead.",  _
    False)> _
Public Sub SetLogThreshold ( _
    iThreshold As Integer _
)
'Usage
Dim instance As SPGlobalAdmin
Dim iThreshold As Integer

instance.SetLogThreshold(iThreshold)
[ObsoleteAttribute("Use the SPDiagnosticsService.SetAll(TraceSeverity) api instead.", 
    false)]
public void SetLogThreshold(
    int iThreshold
)

Parameters

  • iThreshold
    Type: System.Int32

    A 32-bit integer that specifies the level of severity.

Remarks

The SetLogThreshold method lets you control which messages are written to the error log based on severity. The applicable error log is referenced in the Log method.

For example, if iThreshold is set to 5, only log messages with a severity less than or equal to 5 are logged—messages with a severity greater than 5 are not written to the error log.

The following table shows the possible levels of severity that can be passed in the iThreshold parameter.

Value

Description

0

Error.

1

Warning about a problem.

2

Ignorable but a potential problem.

3

Infrequent and happens once per thread, but only information, not a problem.

4

Uncommon and happens several times per thread, but only information, not a problem.

5

Common and happens numerous times per thread, but only information, not a problem.

6

Frequent and happens many times per thread, but only information, not a problem.

7

Verbose log that provides all information.

8

Testing program used only by test application.

See also

Reference

SPGlobalAdmin class

SPGlobalAdmin members

Microsoft.SharePoint.Administration namespace