Tag Archive for ULS

Unified Logging Service Class

Looking for a simple class to add the ability to write to the Unified Logging Service (ULS) for your SharePoint 2010 project? Then the following should provide a good starting point for you.

Full source code for this example is available to download from here.

First things first, create a new class library project and add a class called Logger. Also add a couple of references to your project.

  • Microsoft.SharePoint
  • System.Web

Next, have your class inherit from the SharePoint class Microsoft.SharePoint.Administration.SPDiagnosticsServiceBase.

public class Logger : SPDiagnosticsServiceBase

Read more


Get every new post delivered to your Inbox

Join other followers: