We are using Entity Framework 4.. Whenever we encounter an issue being produced, we want to have the ability to temporarily enable logging of SQL claims. We do not have sufficient permissions around the production SQL Server to operate SQL Profiler.

It is possible to good logging option that (a) could be switched off and on using a config file setting, and (b) does not add significant overhead when it is switched off?

I have discover the Tracing and Caching Provider Wrappers for Entity Framework. This sounds good... but it is sample code and is not formally supported. So I am unsure if it might be right for production. I additionally have no idea when the wrapper would drink too much overhead even if logging is switched off. Has anybody had good encounters with one of these wrappers?

Interesting help,

The code sample continues to be released in a NuGet package. It has been slightly modified to tie in to the built-insInternet tracing system (utilizing a TraceSource rather than just file/console logging).

I have tried on the extender on a few different projects, and I have thought it was useful. It may be enabled/disabled from application.config/web.config as with every other TraceSource.

I've not had any performance issues, but I am only utilizing it in single-user situations.