SharePoint Unified Logging Service (ULS) logs:
How to write error logs using server side:
try
{
//some code
}
catch (Exception ex)
{
SPDiagnosticsCategory myCat=new SPDiagnosticsCategory("A new category",
TraceSeverity.Monitorable,
EventSeverity.Error);
SPDiagnosticsService.Local.WriteEvent(1, myCat,
EventSeverity.Error,
"My custom message",
ex.StackTrace);
}
Log error in javascript:
http://msdn.microsoft.com/en-us/library/hh803115%28v=office.14%29.aspx
No comments:
Post a Comment