Read SharePoint log files.


This topic might seem basic but I get the question quite often. How do you read logs?

Reading the log file.

The simplest way is opening the log files from the 14$logs in Notepad. This might be quickest way but not the most efficient in a live multiuser environment. I usually use this in a development environment in combination with a text editor that automatically reloads the file when it’s updated (Notepad++).

Using powershell with a correlation id

You can use powershell to quickly track down a correlation ID and dump the related log files into a file

get-splogevent -starttime (get-date).addminutes(-20) | where-object { $_.correlation -eq “b66db71a-3257-4470-adf9-5c01dc59ecb3″ } | fl message > c:errors.txt

More info can be found here :

Uls viewer

A Windows application for viewing the ULS logs more easily. Very handy when you are (trying to) reproduce a specific error and during debugging
I use it when I’m trying to track down a specific error and during debugging.

Farm solution

Codeplex also has a nice solution which you can query the SharePoint logs with from within Central Administration.
The solution installs in your Central Administration. Very handy if you want a quick look in your logs files without having to connect over remote desktop to the actual server.
For detailed log digging this tool might not be sufficient.

One Comment

Share Your Thoughts