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.
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