This project has moved and is read-only. For the latest updates, please go here.




We needed to log some of info into our SharePoint portal since SharePoint has a powerful platform and features in term of alerts and easiness of creating views and controlling who can view this logs etc..
So this project makes it so easy to extend  .
I wrote a quick and simple provider to save into sharepoint.
The below code is a sample of SharePoint provider using sharepoint web services (list service) it can be improved with more properties and additional features such adding another option to use the sharepoint object module if it will run on same sharepoint server etc..
Download the attachment to see the source code.

file attachments

Closed Oct 5, 2010 at 2:09 PM by dot_NET_Junkie
This provider is too specific to be part of the CuttingEdge.Logging library. You are welcome however, to create a new contrib project on Codeplex containing alternative logging provider implementations, such as a SharePoint logging provider.


dot_NET_Junkie wrote Aug 9, 2010 at 3:09 PM

I'm not very familiar with SharePoint so I can't really comment on this, but what I notice is that your LogInternal method has a general catch clause where you call a private writeErrorLogToWinEvents method that writes to the windows event log. CuttingEdge.Logging contains the notion of fallback providers. When you configured a fallback for a provider, that provider will log, on failure, not only the reason of the failure, but also the original event to the fallback provider. This fallback provider could again have its own fallback provider.

My advice is to remove this fallback code from the implementation, because it removes the hard dependency of your logger with the Windows event log. Users of your logger can configure the WindowsEventLogLoggingProvider as the fallback provider of your SharePointLoggingProvider.

wrote Aug 9, 2010 at 7:36 PM

tarekjajeh wrote Aug 10, 2010 at 11:47 AM

thanx for drawing my attention to use fallback instead of the general try catch
in fact that's just a sample (proof of concept) :) for the idea, to change it to real provider we need to work on it more, and consider a lot of factors not only the fallback , e.g. security : there should be encryption for the sensitive data in config files such as Credentials etc...

wrote Oct 5, 2010 at 2:09 PM

wrote Feb 13, 2013 at 7:29 PM

wrote May 16, 2013 at 2:56 AM