System.Data.SQLConnection的跟踪和诊断 [英] Tracing and diagnostics for System.Data.SQLConnection
本文介绍了System.Data.SQLConnection的跟踪和诊断的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想知道是否有可以通过app.config文件在SQLConnection上进行跟踪/诊断,就像在需要跟踪支持时,可以使用WCF(如下)?
Hi i was wondering if there is away to allow tracing / diagnostics on a SQLConnection via the app.config file much like you can with WCF when you need tracing support (as below)?
<system.diagnostics>
<switches>
<add name="DataMessagesSwitch" value="0" />
<add name="TraceLevelSwitch" value="0" />
</switches>
</system.diagnostics>
我试图拦截和记录我的应用程序中的SQL请求(不需要创建一个IDBConnection
I'm trying to intercept and log SQL requests from within my application (without needing to create an IDBConnection shim over a SQLConnection to capture the requests as they are executed)
任何想法?
推荐答案
这篇关于System.Data.SQLConnection的跟踪和诊断的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文