Wednesday 6 March 2013

SharePoint 2010 ULS (Trace) Logs Not Working

This is one of the most common problems, I believe, with SharePoint 2010. You set up your brand new farm and configure the required logging levels in Central Admin – Configure Diagnostic logging page. However, you will notice that the log files get created in the folder you assigned the logs to be written to with no data inside them. The logs get rotated as usual but you will find the log file size as 0KB. The files are empty. Here is a solution for such problem scenarios.

There are absolutely 2 (or 3 more exactly) places where SharePoint administrators are exposed to tweak Logging mechanism of SharePoint out of the box. The Central Admin Monitoring Tab has a link to configure diagnostic logging settings which is the first place of interest for any administrator to change the logging settings. The other place is the “SharePoint 2010 Tracing” Windows Service which the actual engine that controls the logging on each individual server of the farm. This is the first point of check for the admins to see whether all the settings in Central Administration are configured properly and if this windows service is running. The same can be checked through power shell commands.

If you still see the same error, then there is a problem with security. In my experience, out of 5 farms that I have installed, these security settings were not properly implemented by SharePoint 2010 installation/configuration in one farm. I don’t know why. However, in order to fix it, please get the credentials with which the service SharePoint 2010 Tracing service is running. Make sure the user account is added to the local group “Performance Log Users”. It should be added to “Performance Monitor Users” local group as well. Restart the windows service after this change and that’s it. This should fix the security issues with the logs and logs should start rolling as per your configuration in central administration.

I read somewhere in the internet that even the application pool accounts should also be added to these security groups but I do not think so and I never had to do it to get the logs rolling.

Thanks for reading and hope this information helps in resolving any SP2010 logging issues you are facing.

No comments: