Wednesday, 28 September 2011

Creating a shared logging block

Overview: A client host multiple applications on there SharePoint on premise farm and these need to be logged consistanly.

Hypothesis: SP2010 provide easy logging ability to the ULS, Microsoft have the SharePoint Best Practices that includes the assemblies for logging, these can be extended to create a easy re-useable set of logging functions. Key areas to cover are where are you logging to: ULS, Event Viewer. Sandbox solution can be logged to ULS and the event viewer using a full trust proxy solution. SharEPoint Online will need to log to a list on the hosted farm.

Microsofts Patterns and Practices code library for SharePoint 2010, is useful for providing the core logging functionality. The Parrerns and Practices can be extended so the custom method for all application on the farm would call the logging code block that is hosted in the GAC.