DataContext.Log property
SharePoint 2013
Gets or sets an object that will write the Collaborative Application Markup Language (CAML) query that results from the translation of the LINQ query.
Assembly: Microsoft.SharePoint.Linq (in Microsoft.SharePoint.Linq.dll)