WF4 中的跟踪不起作用?
我正在尝试设置一个推送到 WF4 中的 TraceListener 的简单测试用例。我创建了一个空的 wcf 服务库应用程序(只是默认的 get/reply xamlx)并将以下内容添加到配置中。我没有重新登录。还需要什么吗?
<system.diagnostics>
<sources>
<source name="System.Workflow">
<listeners>
<add name="System.Workflow" />
</listeners>
</source>
<source name="System.Workflow.Runtime">
<listeners>
<add name="System.Workflow" />
</listeners>
</source>
<source name="System.Workflow.Runtime.Hosting">
<listeners>
<add name="System.Workflow" />
</listeners>
</source>
<source name="System.Workflow.Runtime.Tracking">
<listeners>
<add name="System.Workflow" />
</listeners>
</source>
<source name="System.Workflow.Activities">
<listeners>
<add name="System.Workflow" />
</listeners>
</source>
</sources>
<sharedListeners>
<add name="System.Workflow"
type="System.Diagnostics.TextWriterTraceListener"
initializeData="c:\System.Workflow.trace.log"
traceOutputOptions="DateTime" />
</sharedListeners>
<switches>
<add name="System.Workflow.Runtime" value="Verbose" />
<add name="System.Workflow.Runtime.Hosting" value="Verbose" />
<add name="System.Workflow.Runtime.Tracking" value="Verbose" />
<add name="System.Workflow.Activities" value="Verbose" />
<add name="System.Workflow.Activities.Rules" value="Verbose" />
</switches>
</system.diagnostics>
I'm trying to set up a simple test case of pushing to a TraceListener in WF4. I've created an empty wcf service library app (just the default get/reply xamlx) and added the below to the config. I get no logging back. Is there something else required?
<system.diagnostics>
<sources>
<source name="System.Workflow">
<listeners>
<add name="System.Workflow" />
</listeners>
</source>
<source name="System.Workflow.Runtime">
<listeners>
<add name="System.Workflow" />
</listeners>
</source>
<source name="System.Workflow.Runtime.Hosting">
<listeners>
<add name="System.Workflow" />
</listeners>
</source>
<source name="System.Workflow.Runtime.Tracking">
<listeners>
<add name="System.Workflow" />
</listeners>
</source>
<source name="System.Workflow.Activities">
<listeners>
<add name="System.Workflow" />
</listeners>
</source>
</sources>
<sharedListeners>
<add name="System.Workflow"
type="System.Diagnostics.TextWriterTraceListener"
initializeData="c:\System.Workflow.trace.log"
traceOutputOptions="DateTime" />
</sharedListeners>
<switches>
<add name="System.Workflow.Runtime" value="Verbose" />
<add name="System.Workflow.Runtime.Hosting" value="Verbose" />
<add name="System.Workflow.Runtime.Tracking" value="Verbose" />
<add name="System.Workflow.Activities" value="Verbose" />
<add name="System.Workflow.Activities.Rules" value="Verbose" />
</switches>
</system.diagnostics>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这应该有效:
This should work: