We're using Entity Framework 4.0. When we encounter a problem in production, we'd like to be able to temporarily enable logging of all SQL statements. We don't have enough permissions on the production SQL Server to run SQL Profiler.
Is there a good logging option that (a) can be turned on and off via a config file setting, and (b) doesn't add significant overhead when it's turned off?
I've read about the Tracing and Caching Provider Wrappers for Entity Framework. This sounds good... but it's sample code and isn't officially supported. So I'm not sure if it would be appropriate for production. I also don't know if the wrapper would add too much overhead even when logging is turned off. Has anyone had good experiences with these wrappers?
Thanks for your help,
Richard