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.

More Info:
http://technet.microsoft.com/en-us/library/ee748656.aspx
http://blog.mastykarz.nl/logging-uls-sharepoint-2010/
http://www.alexangas.com/blog/2011/09/intro-to-sharepoint-2010-patterns-practices-logging/
http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=23919

Updated 28 May 2020:
For C#, Power Platform, React, .... I advise to use: App Insights or https://serilog.net/
Log4Net is still very common

0 comments:

Post a Comment