How can I efficiently support Entity Framework SQL logging in production?
The code sample has been released in a NuGet package. It's been slightly modified to tie into the built-in .NET tracing system (using a TraceSource
instead of just file/console logging).
I've used it on a couple of different projects, and I've found it helpful. It can be enabled/disabled from app.config/web.config just like any other TraceSource
.
I haven't had any performance issues, but I'm only using it in single-user scenarios.