Wednesday 30 May 2012

SP2010 Logging Summary

Overview: ULS & Logging can be confusing for SharePoint.  It's really pretty simple and this post aims to clarify the basics of error logging on SP2010 farms.

Tip: Usage records analytics (referred to as Web Analytics).  Usage and ULS logs as well as other metrics and the event log are put into the Reporting database that is configured in "CA" under "monitoring" for "Configure Usage and health data collection".  This post only looks at ULS.

Summary:
  1. Each event in SharePoint is given a unique correlationId, this is a unique identifier to help pull out the appropriate log entries from the ULS. 
  2. ULS create .log files that can be opened individually using notepad.
  3. ULSViewer is useful for examining multiple log files at once.  There are a few products that do the same thing but I use the Microsoft ULSViewer.
  4. The amount of information logged by the ULS can be set in CA or using PS (see image 1 below).
  5. If you enable timer jobs ("Diagnostic Data Provider: xxx" * 7), the data is shipped from the ULS logs on each server into the SP Logging DB.  Useful as it provides a central view and you can backup/achieve the data.  The Timer jobs pull in data from ULS, EventViewer, Timer Jobs and various other performance indicators.
Image 1.  Amending the default logging settings using PowerShell  (Can also use CA)

  
More Info:
Setting Logging levels: http://technet.microsoft.com/en-us/library/ff607887
Debugging & Logging: http://msdn.microsoft.com/en-us/library/gg512103.aspx
Logging explained by Waldek: http://blog.mastykarz.nl/logging-uls-sharepoint-2010/
ULS Explained: http://community.bamboosolutions.com/blogs/sharepoint-2010/archive/2011/07/07/sharepoint-2010-cookbook-the-usage-of-sharepoint-2010-uls-logging.aspx
ULS Viewer by Spencer Harbar: http://www.harbar.net/archive/2010/10/06/ulsviewer-ndash-the-tool-that-no-sharepoint-practitioner-should-be.aspx

0 comments:

Post a Comment