http://www.cnblogs.com/goody9807/archive/2009/03/06/1404691.html

http://msdn.microsoft.com/zh-cn/library/b0ectfxd(v=vs.80).aspx

1.如何启用跟踪

如下为启用WCF的跟踪信息

http://msdn.microsoft.com/zh-cn/library/ee517292.aspx

<configuration>
  <system.serviceModel>
    <diagnostics>
      <messageLogging maxMessagesToLog="30000" logEntireMessage="true" logMessagesAtServiceLevel="true" logMalformedMessages="true" logMessagesAtTransportLevel="true"> </messageLogging>
    </diagnostics>
  </system.serviceModel>
  <system.diagnostics>
    <sources>
      <!-- This section turns on digest logging, note that for this to work correctly, you need to add the following to machine.config: <system.serviceModel> <machineSettings enableLoggingKnownPii="true" /> </system.serviceModel> Search for 'DigestTrace' in the trace viewer to view the digest logs. -->
      <source name="System.IdentityModel" switchValue="Verbose" logKnownPii="true">
        <listeners>
          <add name="xml" />
        </listeners>
      </source>
      <!-- Log all messages in the 'Messages' tab of SvcTraceViewer. -->
      <source name="System.ServiceModel.MessageLogging">
        <listeners>
          <add name="xml" />
        </listeners>
      </source>
      <!-- ActivityTracing and propogateActivity are used to flesh out the 'Activities' tab in SvcTraceViewer to aid debugging. -->
      <source name="System.ServiceModel" switchValue="Error, ActivityTracing" propagateActivity="true">
        <listeners>
          <add name="xml" />
        </listeners>
      </source>
      <!-- This records Microsoft.IdentityModel generated traces, including exceptions thrown from the framework. -->
      <source name="Microsoft.IdentityModel" switchValue="Warning">
        <listeners>
          <add name="xml" />
        </listeners>
      </source>
    </sources>
    <sharedListeners>
      <add name="xml" type="System.Diagnostics.XmlWriterTraceListener" initializeData="trace.e2e" />
    </sharedListeners>
    <trace autoflush="true" />
  </system.diagnostics>
</configuration>

以下为事务的跟踪信息

<system.diagnostics>
  <sources>
   <source name="System.Transactions" switchValue="Information">
   <listeners>
    <add name="tx" type="System.Diagnostics.XmlWriterTraceListener" initializeData= "tx.log" />
   </listeners>
  </source>
 </sources>
</system.diagnostics>

转载于:https://www.cnblogs.com/icewindq/archive/2012/05/22/2394294.html

.NET中的跟踪与调试(TraceDebug)相关推荐

  1. 使用跟踪和调试进行条件编译

    当在开发过程中调试应用程序时,跟踪和调试输出都会出现在 Visual Studio 的"输出"窗口中.不过,若要在已部署的应用程序中包含跟踪功能,则必须在启用 TRACE 编译器指 ...

  2. 在 Shell 脚本中执行语法检查调试模式

    文章目录 shell 脚本调试系列 概述 启用 verbose 调试模式 在 Shell 脚本中启用语法检查调试模式 通过修改脚本的首行来启用脚本检查 内置的 set 命令来在脚本中启用调试模式 sh ...

  3. vue中生产模式和调试模式_为什么在生产中进行调试是如此诱人?

    vue中生产模式和调试模式 生产调试 为什么在生产中进行调试是如此诱人? 在我的第一份工作中,我要做的任务之一是修复一个错误,该错误过去在非常复杂的生产系统中有时会发生. 那很简单! - 我想. 我将 ...

  4. 谷歌浏览器开发调试工具中Sources面板 js调试等 完全介绍

    这次分享的是Chrome开发工具中最有用的面板Sources. Sources面板几乎是我最常用到的Chrome功能面板,也是在我看来决解一般问题的主要功能面板.通常只要是开发遇到了js报错或者其他代 ...

  5. 如何在 Shell 脚本中执行语法检查调试模式

    我们开启了 Shell 脚本调试系列文章,先是解释了不同的调试选项,下面介绍如何启用shell调试模式. 写完脚本后,建议在运行脚本之前先检查脚本中的语法,而不是查看它们的输出以确认它们是否正常工作. ...

  6. Linux课程---11、Linux中软件安装和调试

    Linux课程---11.Linux中软件安装和调试 一.总结 一句话总结: 启动过程:1.安装软件,2.修改配置文件,3.启动服务 查看过程:4.查看进程,5.查看端口 关闭过程:6.关闭软件,7. ...

  7. 转:WF中的跟踪服务(1):Sql跟踪数据库表,视图,存储过程等相关说明

    使用WF 中的SqlTrackingService 跟踪服务,我们可以记录有关工作流及其关联活动的跟踪信息到Sql Server数据库库中.SqlTrackingQuery 类提供对包含在跟踪数据库中 ...

  8. android studio debug设置,在Android Studio中使用Flutter进行调试时如何“设置值...”

    问题 使用"New Flutter Project"创建Flutter App时,以下图像和代码是默认设置 . import 'package:flutter/material.d ...

  9. Qt for ios 在 xcode 中编译(便于调试)

    前言 用 Qt 开发 IOS 程序需要搭配最新版的 xcode 才能进行编译,这个毫无疑问吧.如果需要设置程序图标或启动页之类这种平台性的功能,直接在 xcode 中进行设置是最方便的,并且在 xco ...

最新文章

  1. Matlab数据的可视化 -- 三维表面图
  2. 如何禁用UITableView选择?
  3. SAP UI5 CSS 类 sapUiSmallMarginEnd 的工作和添加原理
  4. day07-vue项目-搭建项目到登录功能
  5. IAR集成开发环境的使用
  6. mac怎么查node版本_py2neo基本操作(v4版本,亲测有效)
  7. windows命令行大汇总
  8. 周题:UVa10736题。Foreign Exchange
  9. How to enable/disable EWF
  10. eplan加密狗已损坏_[转载]EPLAN Electric P8 仿真加密狗 error 1068 问题
  11. Opencv模板匹配学习
  12. UFS学习一:UTP层和UPIU
  13. Linux unison 效率,linux inotify+unison双向同步环境部署
  14. 社交网络关系 mysql架构_社交网络海量用户关系(关系链)设计思考
  15. 关于密码测评,你必须了解的10个基本问题
  16. 一、自动化测试——Airtest+Poco快速上手
  17. OSG中使用png图片显示透明效果
  18. Python中的StringIO与cStringIO简析
  19. A hybrid method of exponential smoothing and recurrent
  20. Python中字典的应用及相关操作!

热门文章

  1. Flutter ListView 下拉刷新与上拉加载更多
  2. bzoj1046(HAOI2007)上升序列
  3. HttpClient官方sample代码的深入分析(连接池)
  4. C++ p63作业 2
  5. Oracle 给字符串补空格、补0
  6. MySQL_数据库表结构的操作
  7. ES6学习笔记(三):教你用js面向对象思维来实现 tab栏增删改查功能
  8. 习题2.1 简单计算器 (20 分)
  9. 7-201 列出连通集 (25 分)
  10. 输出三角形面积和周长 (15 分)