There are some new logging features available within SharePoint Foundation 2010 for developers, along with improvements to existing logging mechanisms.
The SPMonitoredScope is a code attribute that, when applied to a class or method, allows a developer to write logging information to the SharePoint Foundation usage database with complete application information and custom strings.
Every SharePoint Foundation resource request can be captured utilizing the request usage database; this capture is done in real time when a page is rendered.
The Developer Dashboard utility can be enabled to assist with debugging a SharePoint Foundation webpage. This is similar to ASP.NET tracing ...