WCF trace、log
生活随笔
收集整理的這篇文章主要介紹了
WCF trace、log
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
1. 打開wcf配置:
?
2. enable trace , log
可以改變log路徑:
3. 用 SvcTraceViewer.exe (直接在c盤下搜索) 查看
?
4. 如果想自定義trace:
?
catch(Exception ex) { Trace.Write(ex.ToString()); isValidate = false; }可以在config里指定log 名及路徑:
<trace autoflush="true" > <listeners> <add name="myListener" type="System.Diagnostics.TextWriterTraceListener" initializeData="Auth.log" /> <remove name="Default" /> </listeners> </trace> system.diagnostics>可以直接用記事本打開
總結
以上是生活随笔為你收集整理的WCF trace、log的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: centos6.5安装mongodb2.
- 下一篇: UIViewController生命周期