Sunday, June 30, 2013

SharePoint 2010 ULS Logging - C#

I want to share the ULS logging code that I have planned to use from now.
The credit goes to:

Sample code for how you can use it:
UlsLogging.LogInformation("This is information message");
UlsLogging.LogInformation("{0}This is information message","Information:");

UlsLogging.LogWarning("This is warning message");
UlsLogging.LogWarning("{0}This is warning message", "Warning:");

UlsLogging.LogError("This is error message");
UlsLogging.LogError("{0}This is error message","Error:");

No comments: