Setlogginglevel: Stsadm operation (Office SharePoint Server)
Applies To: Office SharePoint Server 2007
This Office product will reach end of support on October 10, 2017. To stay supported, you will need to upgrade. For more information, see , Resources to help you upgrade your Office 2007 servers and clients.
Topic Last Modified: 2015-03-09
Operation name: Setlogginglevel
Description
Sets the Windows event log and trace log logging level for one or more diagnostic logging categories registered in the farm. If an event or trace associated with a category occurs, but is less severe than that category's logging level, then the event or trace will not be written to the event log or the trace log. If an event or trace associated with a category occurs and is equally severe or more severe than that category's logging level, then the event or trace will be written to the event log or the trace log.
Syntax
stsadm.exe -o setlogginglevel
[-category < [CategoryName | Manager:CategoryName [;...]] >]
** {-default |**
** -tracelevel < trace level setting>**
[-windowslogginglevel] <Windows event log level setting>}
Parameters
Parameter name | Value | Required? | Description |
---|---|---|---|
category |
The only valid values are CategoryName or Manager: CategoryName |
No |
The category name to be set. If the category parameter is not specified, then the event throttling setting is applied to all categories in the farm. For example, use this parameter when you only want to apply a logging level setting to one or two categories. Use the Manager:CategoryName value when multiple diagnostic logging category managers have registered the same category name. Note The diagnostic logging category manager for Windows SharePoint Services is "SPDiagnosticsService". |
default |
<none> |
No. See the Examples section. |
Sets the trace logging level and Windows event logging level settings back to the default value for the specified category. |
tracelevel |
Contains any one of the following values:
|
No. However, either the default or tracelevel parameter must be specified. If the tracelevel parameter is specified, you can optionally specify the windowslogginglevel parameter. |
This setting throttles which entries will be recorded in the trace logs. The trace log files are text files that are written to the trace log path that is defined on the Diagnostic Logging page on the SharePoint Central Administration Web site. |
windowslogginglevel |
Contains any one of the following values:
|
No. However, if an event log entry is set using the windowslogginglevel parameter, the tracelevel parameter must also be specified with a valid value. However, if only the tracelevel parameter is used, the windowslogginglevel parameter is not required. |
Controls whether event log entries are sent to the application log, which is visible in the Event Viewer. The ErrorServiceUnavailable, ErrorSecurityBreach, and ErrorCritical parameter values are not available on the Diagnostic Logging page on the Central Administration Web site. However, these values will be displayed in the user interface as Error. If the Information or Success values are used, they will be displayed in the user interface as Information. However, if you select Information in the UI, it is displayed as Success when the listlogginglevels operation is used. |
Examples
For this example, we are using the category name "IRM".
Suppose you have an issue with IRM and are unsure of the cause. To aid in the troubleshooting process, you could lower the event log and trace log threshold so that more events and traces were recorded in these logs. Once you had found and solved the problem, you could reset the logging thresholds back to their default values.
To lower an event log logging level from Error to Warning and the trace logging level from Medium to Verbose, use the following syntax:
stsadm -o setlogginglevel -category IRM -tracelevel verbose -windowslogginglevel warning
To reset the logging thresholds back to the default settings, use the following syntax:
stsadm -o setlogginglevel -category IRM -default