Microsoft SharePoint Unified Logging System (ULS) is great to help you troubleshoot issues in your SharePoint Farm.

The ULS logs are storing information about events (Errors, Warnings, Information) and activities that are running on your SharePoint Server.

By default, SharePoint log files are saved to the following location: C:\Program files\Common Files\Microsoft Shared\Web Server Extensions\15\LOGS.

Note: You should change the location of the log files to another drive.

In the Microsoft SharePoint Central Administration site, you can set Logging level for different categories and change the log file location.

Logging level can be set to:

  • None
  • Critical
  • Error
  • Warning
  • Information
  • Verbose

When setting the log level you can choose all categories or a specific category.

Set-Sploglevel

You can also use the Set-sploglevel PowerShell cmdlet to set the logging level.

Ex: Set-SPLogLevel -TraceSeverity verbose -EventSeverity verbose will set logging level to verbose for all categories.

Once you are done with your troubleshooting, you can use the Clear-Sploglevel cmdlet to reset all categories to the default value.

New-Splogfile

When configuring the log level to verbose, the log file can become very big. One way of working a smaller log file while troubleshooting is to use the New-Splogfile PowerShell cmdlet.

The New-Splogfile PowerShell cmdlet will create a new log file.

You can use the command before trying to reproduce your problem, and run it again when you are done. Then you will have a log file for only the time that you worked on your issue.

Note: If you have multiple servers in your farm, you will need to run this on every servers.

Merge-Splogfile

You can also use the Merge-Splogfile PowerShell cmdlet to create a smaller log file.

Using the following command will create a log file with the information from 11:00 to 11:30 on October 27th 2016, and will merge the information from all the servers in your farm into a single log file.

Merge-SPLogFile -Path “D:\Temp\MergedLog-20161027-1100-1130.log” -StartTime “27/10/2016 11:00:00” -EndTime “27/10/2016 11:30:00”

If you know the Correlation Id you can use the following command to create a log file with only the information about the correlation id.

Merge-SPLogFile -Path “D:\Temp\MergedLog.log –Correlation YourCorrelationID

See more examples of Merge-Splogfile
https://technet.microsoft.com/en-us/library/ff607721.aspx

ULS Log viewer

There are ULS log viewers that will help you reading the log files instead of trying to use Notepad or Notepad ++. These tool are pretty handy, you will be able to filter logs and it will be much easier to read than trying to read from Notepad.

https://www.microsoft.com/en-us/download/details.aspx?id=44020

https://sharepointlogviewer.codeplex.com/


Happy troubleshooting!