I have a SharePoint 2010 solution which deploys some custom controls to the ControlTemplates directory (via mapped folder) and a site scoped feature with a feature receiver class that makes some updates to the site. Everything is working fine except my logging. I'm using the same type of logging commands in both the feature receivers and my custom controls but for some reason, the log entries are showing up in the ULS logs for the feature receivers but not for the custom control code. I've debugged and stepped through the code and no exceptions are thrown, the entries from the custom control code are just not showing up. Here's the type of command I'm using:
SPDiagnosticsService.Local.WriteTrace(0, new SPDiagnosticsCategory("My Controls", TraceSeverity.High, EventSeverity.ErrorCritical), TraceSeverity.High, "An error occurred while rendering the custom control: {0}", ex.ToString());
I've verified that the application pool's account belongs to the Performance Log Users group as I thought it may be a permission issue.
Any ideas why my logging works from a feature receiver class but not from the code of my custom control?