SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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:

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

Your Answer


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.