Multi-Cloud Service Orchestration & Delivery Platform

SharePoint Unified Logging System (ULS)

S

SharePoint ULS,  Explained.

Logging is the key element of any application. A strong logging system helps administrators to troubleshoot the problems and fix them accordingly. Like other Microsoft Applications, SharePoint also has a strong logging system called ULS (Unified Logging system) logging. In SharePoint space, every event / outcome written into the Logs has an associated unique ID which is known as Correlation ID.  Normally this id is displayed in the error which makes administrator’s life easy to trace the error details in the logs.

These log files are known by a few names:

Diagnostic logs / Unified Logging System (ULS) logs / Trace Logs

ULS logs are text files where each line contains a unique event with time stamp, logged with the related farm component, its severity, description of the problem and other useful information relevant to the event. In order to open these files Notepad / text editor or SP log viewing tool can be used.

 

A handy system but ignored often !

ULS logging is a  very handy system in SharePoint but generally ignored even by experts. Microsoft is doing a great job improving the logging system with every new release of SharePoint., these logs exist on every server in the SharePoint farm and record all the activity related to SharePoint. After the SharePoint installation, Diagnostic logging is configured with default settings which include the logging level, logs location, and a number of days of storage etc. It is recommended to change the default settings of the ULS logs after the initial configuration. Specially, ULS logs location.

The default location of the ULS logs is “C:\program file\Common Files\Microsoft Shared\Web Server Extensions\16\LOGS” (for SP 2016), which is system drive. In case verbose (detailed) logging level is enabled, then log files rapidly use the storage on the drive which might put the Operating  System on-risk and also impact the performance of SharePoint Server(s).

Server performance and monitoring is very important. specially,  when it come to Enterprise deployments. so ULS logging can help SP Admins fine tune system performance after the initial deployment.

Following steps can be used to alter the default logging settings.

Open SharePoint CA Site, Navigate to the “Monitoring” Section click on “Configure diagnostic logging” and check/update logging settings.

   

 

 

PowerShell can also be used to check and update logging status

In order to check the current status use “Get-SPDiagnosticConfig

To update Log Location use  “Set-SPDiagnosticConfig  -LogLocation D:\SharePoint-ULS-Logs

replace log location with desired path.

 

A first class troubleshooting tool for SharePoint Admins, ULS Viewer !

ULS Viewer is a utility that provides a simplified view of ULS log files in SharePoint, where log filtering, sorting, highlighting and many other options can be used to narrow down the desired log entry in a well user friendly manner.

It is basically the most important thing should be in hand to troubleshoot issues with SharePoint,  When a problem occurs, ULS logs can provide in-depth information about the problem which enable faster resolution. ULS viewer can be downloaded from https://www.microsoft.com/en-us/download/details.aspx?id=44020

Along with other options It allows real time monitoring…

 

Even-more?  check “Merge-SPLogFile ” command.

Merge-SPLogFile is another very important command used to grab the details into a single file even with specific correlation ID.

example:

Merge-SPLogFile -Path C:\sp-mergelogs\ulslog.txt -Correlation 2pb5c483-c48b-4ef2-b4b3-f5e29f635d91

 

 

Author : Jameel

For product & sales related queries, please email us at sales@machsol.com

Multi-Cloud Service Orchestration & Delivery Platform

Connect with MachSol

MachSol is Microsoft Certified Partner and Microsoft Validated Vendor having years of experience in cloud automation industry.

Categories