Skip to main content

ERROR LOG IN SHAREPOINT

Nice little snippet to log errors using the object model and mininal code:



try
{

}
catch (Exception ex)
{
Microsoft.Office.Server.Diagnostics.PortalLog.LogString("Exception occurred while loading form: {0} || {1}", ex.Message, ex.StackTrace);
}

Merry Christmas

Comments