Blog of Steven Tapping, containing my thoughts, comments and questions. RSS Feed


Managing SharePoint 2007 (MOSS) application log size

The Problem:

SharePoint 2007 by default stores 48 hours worth of logs in a directory buried in your program files folder (C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\LOGS\ !). Very few events get logged to the application event log.

Expect each log file to be at least 200 megs (a log file being generated every 30 minutes by default), or 19 GB of space at the minimum being used by SharePoint logs.

Solutions:

Go to your central administration server web site, and open up the Diagnostic logging:

Central Administration -> Operations  -> Logging and Reporting -> Diagnostic logging

 

In the Diagnostic logging page, focus on the following categories:

  • Event throttling: how much you log
  • Trace Log: where you store the logs

Event Throttling:

  • For a Dev/staging server server, you should log all or "medium events"
  • For a Production server, only log errors
  • The search crawler will take up most of the log space

Trace Log:

  • By Default, logs are sent to: C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\LOGS\
  • Store the logs on a separate drive so that at worse your drive gets full and your application stops logging, but still functions. It's a pretty standard practice for SQL server installations for instance.
  • Reduce the number of log files. The default is two days worth of logging (96 files x 30 min intervals). See if this is too much for you; it might depend on how much you chose to log in the Event Throttling.

 

 

 

 
Posted by Steven Tapping | 8 Comments | Trackback Url | Bookmark with:        
Tags: SharePoint 2007

Links to this Post

Comments

Wednesday, 6 Jun 2007 10:41 by Great, and how to exploit the logs?
Hie, Thanks for the detailed infos and the setup impacts. What would be your advice to use the log files generated? Which tool ? Thanks, Emmanuel.

Wednesday, 20 Jun 2007 03:08 by Re: Managing SharePoint 2007 (MOSS) application log size
Hi Emmanuel, Unfortunately we've just been eyeballing the logs. I haven't found a tool yet to improve the "log viewing" experience... Steven.

Wednesday, 12 Sep 2007 02:18 by ULS Log Viewer tool
There is such a tool to enhance the viewer of the Log. Please see: http://blogs.msdn.com/chrisfie/archive/2007/05/15/analyzing-unified-logging-service-uls-logs-using-sharepoint-s-central-admin.aspx Regards, Alain L.

Monday, 24 Sep 2007 04:02 by Re: Managing SharePoint 2007 (MOSS) application log size
Thanks Alain!

Tuesday, 29 Jan 2008 08:44 by Free ULS Log Reader Tool
http://www.codeplex.com/sharepointloggingspy

Thursday, 1 May 2008 08:32 by Unnecessary logging by default and no rollover options?
I too noticed an outraegous amount of logging in a short time with the default settings. Worse, I cannot find any option to rollover the logs once they get to a certain size only the length of time to use a log file. I have hundreds of megs of log files mostly filled with entries like 05/01/2008 15:50:28.72 OWSTIMER.EXE (0x0B60) 0x0600 Windows SharePoint Services General 0 Medium Preserving template record with size 1122, use count 17, key ct-1033-0x01

Friday, 9 May 2008 01:47 by Application log files growing to GB's
Our is a devlopemnt server. We have done a few customizations (custom web parts) to the sites we are working on. Now the Application log files for the sever are growing to GB's. I can not even open them to view whats really getting loged. Can anyone plese explain why this is happening and what to be done to control this unexpected behaviour. Thanks, Mahavir

Wednesday, 13 Aug 2008 09:39 by Jeff Costa
Steven, Do you have any documentation on what each of the event levels (unexpected, monitorable, high, medium, verbose) includes? I cannot seem to find it documented anywhere.

Name:
URL:
Email:
Comments:

CAPTCHA Image Validation