In this article we can explore the SharePoint 2010 free tool ULS Log Viewer. This is a tool from Microsoft and we are free to use it, but there is no customer support for any issues or queries.
What is Logging?
Eventually in the life cycle of a SharePoint deployment the Administrator and Developer need to look into the SharePoint log information. There are basically 3 kinds of log information to look for; they are:
- SharePoint 14 hive LOGS folder where the SharePoint log information is kept.
- IIS web application log files inside INETPUB LOGS folder.
- Windows Event log where the Service Application log information are kept.
The ULS represents Unified Logging Service and it captures the following:
- Exceptions of SharePoint
- Logs by Applications
Note: the SPDiagnosticsBase class in the Microsoft.SharePoint.Administration namespace enables writing a Trace Log in SharePoint 2010. This is the preferred way for SharePoint 2010 and it includes WriteTrace() and WriteEvent() methods to be overridden.
Who is the Intended Audience?
This tool can be used by the following type of audience:
- SharePoint Administrators
- Developers
- Architects
You can download the tool from the following location:
http://archive.msdn.microsoft.com/ULSViewer
How to view the LOGS files?
We are actually interested in the first option of looking into the SharePoint 14 hive LOGS folder. You can open the folder and see that there are a number of log files as shown below.
- C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\LOGS
The latest log file (sorted by date) should contain the latest log information as shown below:
So there involves a bit of clumsy tasks to view the log information of SharePoint.
What are the Advantages of this Tool?
The ULS Log Viewer tool provides the following advantage:
- A better user interface to view the Log Information
- Filtering of log levels based on Basic, High, Verbose etc.
- Formatting of log information
- Real time Log Information Viewing
- Exporting of Log Information to CSV files
- Multiple Machine Log viewing
- It is Free
You can download the tool from following location:
http://archive.msdn.microsoft.com/ULSViewer
On opening the preceding link you should get the following page:
Click on the Downloads tab and download the file shown.
Starting with the Tool
After downloading you can execute the tool. The main screen looks such as shown below.
Viewing a Log file
You can use the File > Open from > File menu to open a log file from the 14 hive LOGS folder.
As you can see there are Time, Server, Process, Product, Category, Level information for each rows listed.
Filtering the Rows
You can filter the rows using the tool bar buttons:
The rows will be filtered accordingly.
Real time Tracing
Another advantage of the tool is Real Time Tracing. We can see the real time log messages by watching the tool.
For monitoring a folder for real time log messages, use the File > Open From > ULS menu item.
On enabling ULS monitoring, the Notifications List contains the source log file which contains the new log entries. Please note that the specified folder can contain multiple log files.
Click on the Notifications List to see the source file which contains new log entries.
Command Line
The real time mode can be started using the command line too:
ULSLogViewer.exe realtime:FolderPath
Exporting to File
We can also export the selected lines to a File using the context menu.
Smart Highlight
The Smart Highlight button on the toolbar enables highlighting the contents of similar texts. For example placing the mouse over Medium should highlight all the entries of type Medium.
You need to click the Smart Highlight button to enable this view.
References
http://tinyurl.com/sp2010-ulsdoc
Summary
In this article we have explored the ULS Log Viewer tool. In real-life scenarios this tool should give time, cost & convenience advantages.
Reference:
http://www.c-sharpcorner.com/UploadFile/40e97e/uls-log-viewer-in-sharepoint-2010/
No comments:
Post a Comment