Handy CodePlex solution for looking up ULS logs from within SharePoint

Codeplex LogoWhen I was in the US last week, I commented that it would be great if SharePoint and Project Server made it easier to look up the relevant ULS log entries for a specific correlation id. Of course, the traditional way of viewing these is to navigate to the ULS log location within the farm and view the relevant log file, or to use the excellent ULS Viewer tool to interrogate the files. However, both of these options require the user to have physical access to the file system where the ULS logs are located, which isn’t always available, especially on a production environment.

Thanks to Christophe, who pointed me at this excellent CodePlex solution called SPCorrelationViewWP, is the brainchild of Tom Van Gaever who has done a fantastic job. The project provides a web part and a site action menu item which allows you to enter a Correlation ID and pulls back the relevant ULS log entries for that Correlation ID directly within the SharePoint GUI.

Correlation ID Viewer

After installing the solution two items will be added, including a new web part to the web part gallery.

Correlation ID Web Part

Also the solution will add a new menu item to the Site Actions menu which when you click, will pop up a dialog for you to enter a Correlation Id to pull back the relevant ULS lines, all without needing to grant the user access to the file system directly to read the logs.

Site Actions - Correlation ID Viewer

After looking at the solution, I wondered if it might be more appropriate to offer the Correlation ID lookup via Central Administration, after all, you may not want all end users seeing the option, or giving them the capability to trawl through the logs. So whilst making a minor code fix to allow the Site Actions item to work for Project Server, I also coded up a new feature which adds a Correlation Id item to the Monitoring section of Central Administration.

Central Admin - Correlation Viewer

These changes have been uploaded as a patch which you can download the source directly from here, hopefully it will get accepted into the main solution in the coming weeks. Tom is also requesting feedback and feature suggestions on the project via the discussion forums, so please make sure you give him feedback.

Advertisements

2 thoughts on “Handy CodePlex solution for looking up ULS logs from within SharePoint

  1. Too bad. It takes up all free RAM until out of memory exception is thrown. If you are lucky, you can search for several correlation ID before getting the error. I think it’s due to the fact that I have very large log files. But it’s not even production environment…

    • That is always something to worry about when user codeplex solutions. The best practice is to do exactly what you have done and test the solution out before installing it on the production environment :)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s