|Posted by jamees.wright on May 1, 2012 at 11:00 AM|
Two weeks ago, we talked about Monitoring SharePoint. Valued Member, Daniel Westerdale took it to the next step and would also like to share code with the group! Follow Daniel on Twitter: @westerdaled (https://twitter.com/#!/westerdaled) and stay tune to his blog as he will talk about this code in more details.
"BTW we talked about ULSlogging last week . I built a class that I have been using all week to write to the ULSVIewer and be easily filtered ...Product Contains SharePointShopTalk" - Daniel
Here is the an example:
• Add this code to c# library project
• Sign the assembly
• Add the project reference to whatever SharePoint feature you are coding.
• Log your messages or errors using the desired method in the ULSLogger
• Add the project DLL to the desired SharePoint feature -> package designer ->advanced so the DeploymentTarget should be the GlobalAssemblyCache
• Build solution
• Package up your wsp and deploy on to server – I used PowerShell commands.
• Go to the ULSViewer and have lots fun!