ServiceEventSource.Current.ServiceMessage未在Visual Studio诊断事件窗口

时间:2017-10-19 06:18:53

标签: azure-service-fabric

开箱即用

ServiceEventSource.Current.ServiceMessage(serviceContext, $"Starting Kestrel on {url}");

未显示在我的诊断窗口中。以下执行始终在 ServiceEventSource.cs

中返回false
this.IsEnabled()

但是,删除该检查仍然不会在日志中显示任何内容。我无法使用生成的类输出信息。

有人可以帮忙吗?

由于

1 个答案:

答案 0 :(得分:0)

通过在Visual Studio中添加EventSource,按照正确的答案解决了这个问题:

Azure ServiceFabric samples not logging to ETW