Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I'm working on a SharePoint 2010 project which consists of a few application pages and some webparts. Whenever some error occurs in any of the custom pages/webparts I get the sharepoint error page with a corelation Id but nothing is getting logged in the ULS. Do I have to explicitly log the errors from my object to show up in ULS? Diagnostic Logging settings is set to log Event Level Information for everything.

share|improve this question
add comment

1 Answer

Yes, your custom web part/application page code should log relevant information to ULS logs. SharePoint may log some information depending on type of error but information logged by your custom code helps to rectify issues specifically in your code.

I recommend using logging framework written particularly for SharePoint like this: http://msdn.microsoft.com/en-us/library/ff798402.aspx

share|improve this answer
    
Absolutely. The guidance from patterns and practices is the way to go. –  Paul Schaeflein Jan 4 '12 at 1:43
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.