跟踪和诊断System.Data.SQLConnection [英] Tracing and diagnostics for System.Data.SQLConnection

查看:160
本文介绍了跟踪和诊断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垫片过的SQLConnection捕捉到的请求,因为他们执行)

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)

有什么想法?

推荐答案

ADO .NET技术文章:跟踪数据访问帮助吗?

这篇关于跟踪和诊断System.Data.SQLConnection的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆