Search Wiki:

Summary

ULSViewer allows users to open a ULS log file and display its contents in a user friendly format. Users can then perform advanced functions such as filtering, sorting, highlighting, loading logs, appending logs, etc in order to single out the data that is important to the user. This information can be used to diagnose problems with machines running ULS services, or to monitor machines and the events they create in realtime.

Introduction

This article discusses the ULS Viewer tool.

Warning: The ULSViewer tool is an unsupported application that can be used to analyze ULS log files. Microsoft does not provide support for this tool. Use this tool at your own risk. Microsoft Product Support Services (PSS) cannot answer questions about the ULSViewer tool.


ULSViewer allows users with access to ULS log files to view their logs in a more user friendly interface instead of using standard log file viewers. Logs opened can be filtered, sorted, highlighted, appended, etc in order to single out the data that is important to the user. This information can be used to diagnose problems with machines running ULS services, or to monitor machines and the events they create.

The ULSViewer tool runs on either 32 or 64 bit architectures of Microsoft Windows 2003 Server, Windows 2008 Server, Windows 2008 Server R2, Windows 7, Windows Vista, and Windows XP.

Features

The ULSViewer tool performs various actions against the data from ULS log files in order to better analyze it. ULSViewer allows the user to:
  • Highlight data of importance to the user on the fly
  • Bookmark log entries
  • Append logs to other logs in order to track trends
  • Hide unimportant data
  • Only view critical log entries by sorting data by severity
  • Write rules to prompt the user when certain events occur
  • View your data in a spreadsheet instead of the text file ULS generates
  • Monitor remote machines logs that are running ULS services
  • Open multiple logs at the same time in order to compare log files.
  • Open logs files from multiple machines at the same time.

Detailed Documentation

ULSViewer.docx

Last edited Oct 9 2009 at 6:43 AM  by dwinter, version 13
Comments
voronkov wrote  Jan 26 2010 at 9:52 AM  
Great tool!

Is it possible to add toolbar shortcut for action "File - Open From - ULS"?

Yimeng wrote  Mar 23 2010 at 12:48 AM  
Ctrl+U should do the trick :)

sntr wrote  Apr 29 2010 at 12:26 PM  
DataTime format problem:
File reader could not understand line 4748. Line was: 04/29/2010 15:57:52.72 ..... Error was: System.FormatException: ?????? ?? ?????????? ??? ?????????????? ???????? DateTime.
? System.DateTimeParse.Parse(String s, DateTimeFormatInfo dtfi, DateTimeStyles styles)

Windows 7 Rus
Sharepoint 2010 En


Hamade wrote  Jul 5 2010 at 6:19 AM  
From where I can insall the source code??

eiben wrote  Aug 24 2010 at 5:22 PM  
+1 for the Source-Code ...

BTW: It seems that the ULSViewer has some trouble on non-english OS, for e.g. running ULSViewer on a german windows-server gives me a whole lot of parse-errors for the date-time of the log :(

dmcweeney wrote  Sep 22 2010 at 1:14 PM  
I too have the same problem - any idea if this will ever be fixed?

File reader could not understand line 71488. Line was: 09/22/2010 13:31:00.74 OWSTIMER.EXE (0x2570) 0x1574 SharePoint Foundation Timer 8e46 Verbose End invoke timer job UserProfileServiceApp - User Profile Language Synchronization Job, id {EC9DFAD1-1B18-487B-BF50-A8F17BEF09A4}, DB n/a c571fdcc-3b64-4ccc-acf1-fb9d586e80c7. Error was: System.FormatException: String was not recognized as a valid DateTime.
at System.DateTimeParse.Parse(String s, DateTimeFormatInfo dtfi, DateTimeStyles styles)
at UlsGump.Column.TimeColumn.ParseTime(StringFacade timeString)
at UlsGump.UlsEntry.SetEntryFromThread(StringFacade[] threadFacades, StringCacheFile stringCacheFile, Int64 messageLocation)
at UlsGump.UlsEntry.ReadFromUlsBuffer(Char[] buffer, Int32 bufferStart, Int32 bufferCount, StringCacheFile stringCacheFile, Int64 fileStart)
at UlsGump.FilePump.ReadJob()

Alekseyp wrote  Sep 27 2010 at 10:59 AM  
Guys,

I found a solution! In my environment I've got 4 servers in a farm. 2 are WFE and 2 are SQL Cluster. All servers run Windows Server 2008 R2 Rus. To run ULS Viewer correctly I had to run ULS Viewer on my notebook (Windows 7 Eng) and then plug SharePoint logs using UNC path \\serverc\$\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\LOGS. Because I use 2 WFE I ran 2 ULS Viewers at the same time and connect them to each WFE respectively.

AKrasheninnikov wrote  Nov 24 2010 at 3:27 PM  
Unfortunately this tool is not culture neutral: UlsRuntimePump could not understand this line: 11/24/2010 18:26:14.38 as a valid DateTime. Throws FormatException. Please fix!

moontear wrote  Jan 13 2011 at 1:45 PM  
When you get the UlsRuntimePump FormatException error - try changing the locale to something different and change it back to the way it was before.

I had my locale set to English (United States), had the error, changed locale to German (Germany), started ULS --> works. Change locale back to English (United States) --> ULSViewer still works. I'm assuming I had some weird settings in the locale before which broke ULSViewer. Thanks for the hint though AKrasheninnikov

Enemykilowatt wrote  Feb 16 2011 at 10:44 PM  
I can't seem to get real-time ULS monitoring working. I do have my SharePoint logs in a location other than the default. I've tried running it on Windows 2008 R2 and Windows 7... I've tried running with command line option realtime:<file location>... but no events ever appear ... am I missing something?

ssandu wrote  Feb 18 2011 at 10:39 AM  
Please do something regional settings and SharePoint language.
I get only this error
UlsRuntimePump could not understand this line: 02/18/2011 12:33:18.37 w3wp.exe (0x2294) 0x2904 SharePoint Foundation Monitoring nasq Medium Entering monitored scope (ExecuteWcfServerOperation) 0c11f173-1c52-44ed-a8cd-a47c73a53a73. Error was: System.FormatException: String was not recognized as a valid DateTime.

at System.DateTimeParse.Parse(String s, DateTimeFormatInfo dtfi, DateTimeStyles styles)

at UlsGump.Column.TimeColumn.ParseTime(StringFacade timeString)

at UlsGump.UlsEntry.SetEntryFromThread(StringFacade[] threadFacades, StringCacheFile stringCacheFile, Int64 messageLocation)

at UlsGump.UlsEntry.ReadFromUlsLine(String line)

at UlsGump.UlsRealtimePump.ReadUls()

Thank's

Sorin

MartinHatch wrote  Mar 16 2011 at 3:16 PM  
I am also having a problem with RealTime feed which is NOT working (Windows Server 2008 R2, SharePoint 2010).

Standard "default" install. It works if I point it at a specific file, but when using "Real Time" feed (or even pointing it at the LOGS folder directly) does NOT work.
I have checked the LOGS folder manually and the ULS logs are being correctly generated and are full of events.

Note - running with UAC turned off, as full local server administrator, domain admin, SQL sysadmin and SharePoint Farm admin.

Anyone got any ideas?

MartinHatch wrote  Mar 16 2011 at 3:31 PM  
Note - moving the logs to a custom folder I created got it working .. must be some dodgy NTFS permissions or something?

Wes_SysAdmin wrote  Mar 17 2011 at 9:22 PM  
Had the same issue with the RT feed on 1 server in 20 SPS2010.
Actually, I found out that ulsviewer was spinning on 1 specific file in the tracelogs directory. The filter used (*-????????-?????.log) to parse the logs was hitting another old file linked to a precedent Powershell command to attach a DB (Upgrade-20110111-201212-3-error.log). The pb is this file structure isn't formatted at all as the ULS ones thus ulsviewer spinning nowhere.
Moving the "upgrade*" files outside the tracelogs folder did the trick.
Hope this helps.

Enemykilowatt wrote  Mar 27 2011 at 3:10 PM  
@Wes_SysAdmin:
That did the trick - I moved my upgrade*.log files to a subfolder and real-time logging now works... Thanks!

merill wrote  Apr 12 2011 at 2:36 AM  
Removing just the upgrade*.log files didn't work for me. Since it was my dev box I brute force deleted all the files and the problem was fixed.

niazi wrote  Jul 26 2011 at 7:45 AM  
@Wes_SysAdmin:
removing the upgrade*.log did the trick. Many thanks

dacc wrote  Aug 19 2011 at 8:49 AM  
Just faced the "String was not recognized as a valid DateTime" issue as well.

Issue was only resolved once I made sure that the date/time format of PC where ULS Viewer was running matched the format in which date/time was written in the log.

Chouf wrote  Aug 29 2011 at 12:20 PM  
Had the same issue with the real time view; nothing would load.
I'm using a custome location for my Sharepoint logs (D:\SharePointLogs\Logs) and the folder was filled with other files not modified for the last two years like "HOSTS.2008.12.02.08.42.04.58" or "PSCDiagnostics_12_21_2010_11_47_50_811_693859222.log" etc...

I moved all these files in a subdirectory "Old", closed and restarted ULSViewer > File > Open from ULS and it started working like a charm.

thanks for the trick !

WolfeR wrote  Sep 2 2011 at 5:18 AM  
..we also have the issue with datetime format - on german machines / SharePoint installations. (Many of your customers use such.) Do someone know if there will be a next version supporting other locales than English? Thx in advance...

johnmcalvert wrote  Dec 16 2011 at 7:11 PM  
Had the same issue with real time view; nothing would load. Moved all but most recent log files to an old subfolder. Now it works fine.

schletti2000 wrote  Dec 21 2011 at 9:14 AM  
Hello all

I wrote a small fix for the DateTime problem because I didnt want to use textpad instead of ULSViewer every month after the 12th. It creates a new exe with DateTime.Parse withCurrentUICulture changed to DateTime.Parse with en-US setting.
http://archive.msdn.microsoft.com/ulsviewerfix/

I havent found any better tool for monitoring and viewing ULS files than this one

HiDhiman wrote  May 3 2012 at 6:41 AM  
If the dates are not showing properly check your Sharepoint timer service on the server. If stopped start it and reopen the log file. :)

gradumct wrote  Mar 8 at 2:16 PM  
I am having great trouble using ULSViewer with SharePoint 2013 logs, on the server, live or on a workstation, using saved logs. It crashes unexpectedly with Error ID 1000 in Application log. Faulting application name: UlsViewer.exe, version: 2.0.3530.27850. Faulting module name: mscorwks.dll, version: 2.0.50727.4223. Exception code: 0xc00000fd.
Anyone else having this issue?

Updating...
Page view tracker