ULS Logger 1.0

Rating: No reviews yet
Downloads: 1000
Released: Apr 21, 2009
Updated: Apr 27, 2009 by RyanLMiller
Dev status: Stable Help Icon

Recommended Download

Source Code ULSLogger_SRC.zip
source code, 249K, uploaded Apr 27, 2009 - 619 downloads

Other Available Downloads

Application ULSLogger_Setup.zip
application, 83K, uploaded Apr 27, 2009 - 224 downloads
Documentation ULSLogger_Readme.txt
documentation, 2K, uploaded Apr 21, 2009 - 157 downloads

Release Notes

This is a class library I use to handle logging in the SharePoint uls logs. I used to put these classes (or similar)
into every project I created, but that got old in a hurry.

The TraceProvider class was ripped directly from the WSS SDK trace provider example.
The ULS class was modeled after a class within the community kit (cks.codeplex.com).

When you're developing, you can just add a reference to the .dll in your project. On your SharePoint server you can deploy the .dll using the solution file or just drop the .dll in the GAC.

This solution was created using the Smart Template addin for Visual Studio 2008 (smarttemplates.codeplex.com)

There are 3 public static methods available in the ULS class here. So far they've covered all my needs, but let me know if you find a regular use for another method.

static void LogMessage(string source, string message, string category, TraceProvider.TraceSeverity severity)
static void LogError(string source, string errorMessage, string errorCategory)
static void LogError(string source, Exception ex)

Ryan L. Miller is a SharePoint Developer/Architect in Columbus, Ohio.
Company: www.mylocalbroadband.com
Blog: www.intranoggin.com

Release Updates
  • 4/27/2009 Added call in write trace method to self register the trace provider if it has not already been registered.

Reviews for this release

No reviews yet for this release.