WCF调试日志

     WCF调试,打不了断点or远程调试时,在配置文件的<configuration>结点下面加一段,就可以在对应位置查看服务器调试日志了,远程调试完毕发送亦可!

 
<system.diagnostics>
<sources>
    <source name="System.ServiceModel" switchValue="Warning" propagateActivity="true">
    <listeners>
        <add name="xml" />
    </listeners>
    </source>
</sources>
<sharedListeners>
    <add name="xml" type="System.Diagnostics.XmlWriterTraceListener" initializeData="【路径】wcf.svclog" />
</sharedListeners>
</system.diagnostics>

 

yeah~

原文地址:https://www.cnblogs.com/snys98/p/4440431.html