Unified Logging Systems

There are some new logging features available within SharePoint Foundation 2010 for developers, along with improvements to existing logging mechanisms.

SPMonitoredScope

The SPMonitoredScope is a code attribute that, when applied to a class or method, allows a developer to write logging information to the SharePoint Foundation usage database with complete application information and custom strings.

Request Usage Database

Every SharePoint Foundation resource request can be captured utilizing the request usage database; this capture is done in real time when a page is rendered.

Developer Dashboard

The Developer Dashboard utility can be enabled to assist with debugging a SharePoint Foundation webpage. This is similar to ASP.NET tracing in which this dashboard displays all of the details of the user request, which are then relayed to the developer.

API Improvements

In Windows SharePoint Services 3.0, to write to the SharePoint Trace and Unified Logging Systems (ULS) Logs, you had to implement the IDiagnosticsManager interface (requiring additional code). In SharePoint Foundation, the preferred method is to use the SPDiagnostics ServiceBase class, which contains a much simpler and more efficient way to interact with ULS Logs; specifically, the WriteEvent and WriteTrace methods are simpler to implement.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset