Best practices
The SharePoint Server 2010 environment might require configuration of the diagnostic loggings settings after initial deployment or upgrade and possibly throughout the system’s life cycle. The guidelines in the following list can help you form best practices for the specific environment.
- Change the drive that logging writes to. By default, diagnostic logging is configured to write logs to the same drive and partition that SharePoint Server 2010 was installed on. Because diagnostic logging can use lots of drive space and writing to the logs can affect drive performance, you should configure logging to write to a drive that is different from the drive on whichSharePoint Server 2010 was installed. You should also consider the connection speed to the drive that logs are written to. If verbose-level logging is configured, lots of log data is recorded. Therefore, a slow connection might result in poor log performance.
- Restrict log disk space usage. By default, the amount of disk space that diagnostic logging can use is not limited. Therefore, limit the disk space that logging uses to make sure that the disk does not fill up, especially if you configure logging to write verbose-level events. When the disk restriction is used up, the oldest logs are removed and new logging data information is recorded.
- Use the Verbose setting sparingly. You can configure diagnostic logging to record verbose-level events. This means that the system will log every action that SharePoint Server 2010 takes. Verbose-level logging can quickly use drive space and affect drive and server performance. You can use verbose-level logging to record a greater level of detail when you are making critical changes and then re-configure logging to record only higher-level events after you make the change.
- Regularly back up logs. The diagnostic logs contain important data. Therefore, back them up regularly to make sure that this data is preserved. When you restrict log drive space usage, or if you keep logs for only a few days, log files are automatically deleted, starting with the oldest files first, when the threshold is met.
- Enable event log flooding protection. Enabling this setting configures the system to detect repeating events in the Windows event log. When the same event is logged repeatedly, the repeating events are detected and suppressed until conditions return to a typical state.
You can set the level of diagnostic logging for the event log and for the trace log. This will limit the types and amount of information that will be written to each log. The following tables define the levels of logging available for the event log and trace log:
Event log levels
Level | Definition |
---|---|
None | No logging occurs. |
Critical | This message type indicates a serious error that has caused a major failure in the solution. |
Error | This message type indicates an urgent condition. All error events should be investigated. |
Warning | This message type indicates a potential problem or issue that might require attention. Warning messages should be reviewed and tracked for patterns over time. |
Information | Information messages do not require any action, but they can provide valuable data for monitoring the state of your solution. |
Verbose | This event log level corresponds to lengthy events or messages. |
Trace log levels
Level | Definition |
---|---|
None | No trace logs are written. |
Unexpected | This level is used to log messages about events that cause solutions to stop processing. When set to log at this level, the log will only include events at this level. |
Monitorable | This level is used to log messages about any unrecoverable events that limit the solution’s functionality but do not stop the application. When set to log at this level, the log will also include critical errors (Unexpected level). |
High | This level is used to log any events that are unexpected but which do not stall the processing of a solution. When set to log at this level, the log will include warnings, errors (Monitorable level) and critical errors (Unexpected level). |
Medium | When set to this level, the trace log includes everything except Verbose messages. This level is used to log all high-level information about operations that were performed. At this level, there is enough detail logged to construct the data flow and sequence of operations. This level of logging could be used by administrators or support professionals to troubleshoot issues. |
Verbose | When set to log at this level, the log includes messages at all other levels. Almost all actions that are performed are logged when you use this level. Verbose tracing produces many log messages. This level is typically used only for debugging in a development environment. |
Configure diagnostic logging by using Central Administration
You can use Central Administration to configure diagnostic logging.
To configure diagnostic logging by using Central Administration
Verify that the user account that is performing this procedure is a member of the Farm Administrators SharePoint group.
In Central Administration, on the Home page, click Monitoring.
On the Monitoring page, in the Reporting section, click Configure diagnostic logging.
On the Diagnostic Logging page, in the Event Throttling section, you can configure event throttling as follows:
To configure event throttling for all categories:
- Select the All Categories check box.
- Select the event log level from the Least critical event to report to the event log list.
- Select the trace log level from the Least critical event to report to the trace log list.
To configure event throttling for one or more categories:
- Select the check boxes next to the categories that you want.
- Select the event log level from the Least critical event to report to the event log list.
- Select the trace log level from the Least critical event to report to the trace log list.
To configure event throttling for one or more sub-categories (you can expand one or more categories and select any sub-category):
- Click (+) next to the category to expand the category.
- Select the check box next to the sub-category.
- Select the event log level from the Least critical event to report to the event log list.
- Select the trace log level from the Least critical event to report to the trace log list.
To configure event throttling for all categories back to default settings:
- Select the All Categories check box.
- Select Reset to default from the Least critical event to report to the event log list.
- Select Reset to default from the Least critical event to report to the trace log list.
- Select the All Categories check box.
In the Event Log Flood Protection section, select the Enable Event Log Flood Protection check box.
In the Trace Log section, in the Path box, type the path of the folder to which you want logs to be written.
In the Number of days to store log files box, type the number of days (1-366) that you want logs to be kept. After this time, logs will automatically be deleted.
To restrict how much disk space the logs can use, select the Restrict Trace Log disk space usage check box, and then type the number gigabytes (GB) you want to restrict log files to. When logs reach this disk size, older logs will automatically be deleted.
After you have made the changes that you want on the Diagnostic Logging page, click OK.
Comments
Post a Comment