Partager via


Log Method

The Log method of the SPGlobalAdmin class creates a log that indicates the severity of a problem in the Microsoft Windows SharePoint Services deployment and provides details.

Parameters

iSeverity   A 32-bit integer that specifies the level of severity to report in the log.

strMessage   A string that contains the description used in the log for the specified severity.

Remarks

The Log method logs to a text file in %temp%\Process_Name.log. For instance, stsadm.exe internally calls SPGlobalAdmin.Log(), which results in %temp%\stsadm.log being created.

The following table shows the possible values that can be passed in the iSeverity 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 TestingProgram only used by test application.

Requirements

Platforms: Microsoft Windows Server 2003

Security: Code Access Security