ULS logs are unavoidable in SharePoint administration and support. This post describes the basic usage of ULS log viewer to reveal actual error message in SharePoint 2013 environment.
Scenario: You got an E-mail from end-user saying: They received a typical “An unexpected error has occurred.” page with some GUID, time stamp, etc. User forward the error screenshot to SharePoint support team.
How to get the detailed error message using ULS Viewer?
Every request SharePoint receives, assigns a correlation ID in the form of a GUID. Whenever SharePoint presents an error to an end-user, it includes the correlation ID as part of the error message. It could be challenging to find the detail that you need from an unformatted text file. However, The ULS Viewer tool lets us open and analyze ULS log files in a user-friendly format. Here is how to use SharePoint ULS viewer.
- To start with, Download the ULS Viewer tool to your SharePoint Web front-end server. It’s a tiny Click-and-run application, no installation is required.
- Open ULS Viewer application. Click on File Menu >> Open From >> File. This opens the default LOGS folder of your SharePoint hive, “C:\Program
Files\Common Files\Microsoft Shared\Web Server Extensions\15\LOGS”.
- Select log file(s) based on the time stamp from the error page. You can select multiple log files at once.
- Once logs files are opened, apply the filter with your correlation GUID by clicking the “Filter” icon from the toolbar. Here is mine. Set the correlation value to the GUID we received in the error screen.
- This filters all detailed error messages of the specific correlation ID.
Please note, this searches LOGS only with in the current web front end. If you have multiple web front end servers, you have to repeat this step in all servers of your SharePoint farm. To monitor live ULS logs, Use File >> Open From >> ULS (Ctrl + U) option!
You can also use PowerShell cmdlet Get-SPLogEvent to get error details from the correlation ID. Here is How to get detailed error from Correlation ID using PowerShell