Skip to main content

Enable event log flooding protection in SP 2010

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

LevelDefinition

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

LevelDefinition

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

  1. Verify that the user account that is performing this procedure is a member of the Farm Administrators SharePoint group.

  2. In Central Administration, on the Home page, click Monitoring.

  3. On the Monitoring page, in the Reporting section, click Configure diagnostic logging.

  4. On the Diagnostic Logging page, in the Event Throttling section, you can configure event throttling as follows:

    To configure event throttling for all categories:

    1. Select the All Categories check box.

    2. Select the event log level from the Least critical event to report to the event log list.

    3. 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:

    1. Select the check boxes next to the categories that you want.

    2. Select the event log level from the Least critical event to report to the event log list.

    3. 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):

    1. Click (+) next to the category to expand the category.

    2. Select the check box next to the sub-category.

    3. Select the event log level from the Least critical event to report to the event log list.

    4. 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:

    1. Select the All Categories check box.

    2. Select Reset to default from the Least critical event to report to the event log list.

    3. Select Reset to default from the Least critical event to report to the trace log list.

  5. In the Event Log Flood Protection section, select the Enable Event Log Flood Protection check box.

  6. In the Trace Log section, in the Path box, type the path of the folder to which you want logs to be written.

  7. 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.

  8. 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.

  9. After you have made the changes that you want on the Diagnostic Logging page, click OK.

Comments

Popular posts from this blog

How to get SPUser or SPGroup from Person or Group field

You have person or group field in SharePoint list and you want to programmatically get the user or person. The below code to gets SPUser from User or Group field in the list when multiple choice and Groups are not allowed in the field: //get SPUser SPFieldUser userField = (SPFieldUser)item.Fields.GetField("Users"); SPFieldUserValue userFieldValue = (SPFieldUserValue)userField.GetFieldValue(item["Users"].ToString()); SPUser user = userFieldValue.User; This part of code would help you to get SPUser when multiple choice is allowed and groups are not allowed: //Multiple choices are allowed SPFieldUser userField = (SPFieldUser)item.Fields.GetField("Users"); SPFieldUserValueCollection userFieldValueCollection = (SPFieldUserValueCollection)userField.GetFieldValue(item["Users"].ToString()); foreach (SPFieldUserValue userFieldValue in userFieldValueCollection) {     Console.WriteLine("     " + userFieldValue.User.LoginName); } And when group...

SharePoint publishing page scheduling

In SharePoint 2010 publishing enabled team site collection is not showing schedule button in publish ribbon. Solution: Here is how to enable it  though the UI: Locate the SharePoint Server Web site on which you want to enable content approval and item scheduling. Click  Site Actions , click  Site Settings , and then click  Modify Pages Library Settings . Under  General Settings , click  Versioning Settings . Click  Yes  next to  Content Approval , and then click  OK . Click  Manage item scheduling .   Click to enable the  Enable scheduling of items in this list  check box, and then click  OK .

Changing Content Type Hub URL

Change the Hub URL through powershell by using: Set-SPMetadataServiceApplication -Identity " " -HubURI " " For Ex: Set-SPMetadataServiceApplication -Identity "Managed Metadata Service" -HubURI "http://contenttype.Domain.Com" When you try to do this you get this rather scary message: This is SharePoint telling you that this is a major thing so be careful! Essentially all your content types that you have published out will be removed if they can, and you have to republish all of your content types out again which can cause some issue.