我尝试设置将 Service Fabric 日志传输到 Azure 诊断,并且使用了本文
[EventSource(Name = "MyCompany-MyApp-WebApi")]
internal sealed class ServiceEventSource : EventSource {}
我已经向 Clustermanifest 添加了一个新的提供程序
{
"provider": "MyCompany-MyApp-WebApi",
"scheduledTransferPeriod": "PT5M",
"DefaultEvents": {
"eventDestination": "ServiceFabricReliableServiceEventTable"
}
},
它实际上将所有日志发送到 Azure 诊断,但所有日志条目都是空的(见图)
最佳答案
尝试仅将 eventDestination 值修改为 EventTable。集群 list 应如下所示:
{ "provider": "MyCompany-MyApp-WebApi", "scheduledTransferPeriod": "PT5M", “默认事件”:{ "eventDestination": "事件表" } },
关于Azure Service Fabric 日志记录到 Azure 诊断不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37541237/