Tag Archives: log

LogParser – Converting IIS logs to local date and time and filtering by date range

This is a note to myself to remember how to convert the UTC date/time to the local timezone.

logparser “SELECT TO_TIMESTAMP(date, time) AS utc-timestamp, TO_LOCALTIME(utc-timestamp) AS local-timestamp,* FROM D:\Log\SearchServiceWrapperLogs\SearchServiceWrapperLogs\u_ex1202* WHERE local-timestamp between timestamp(’2012/02/02 00:00:00′, ‘yyyy/MM/dd hh:mm:ss’) and timestamp(’2012/02/03 00:00:00′, ‘yyyy/MM/dd hh:mm:ss’)” -recurse:-1 -o:csv >> fulllog.csv

ULS Viewer stops working

If ULS Viewer suddenly stops reading from the ULS log, the quick fix is to move all the log files to another folder. Except for the last log file which Explorer will anyway prevent you from moving.

The issue is most probably because one or more files in the folder are not in the right format and trip up ULS Viewer.

Some have reported the *upgrade.log files as the culprit. Deleting them didn’t fix it for me so I just deleted all the files.

PS: If your a SharePoint dev and your not using the ULS Viewer from Microsoft (no not the one from CodePlex). Do yourself a favour and give it a try.
http://archive.msdn.microsoft.com/ULSViewer