【发布时间】:2018-08-09 12:13:03
【问题描述】:
我有一个可用的 Azure 函数,我添加了一些带有日志 (Ilogger instance) 的日志,每当我测试函数或通过浏览器点击函数 URL 时,我都可以在 Azure 门户的日志控制台中看到它们。
我想发送相同的日志 Azure Blob,所以我配置了,
Diagnostics Logs-> Application Logging (Blob) on -> Level Verbose -> Storage accounts settings set up to an existing storage account with container.
但我在那里看不到我的日志。我看到生成的文件夹和写入的日志,但它们就像标准请求状态消息,如下所示:
2018-08-09T07:37:29,Information,TestFunction,cec757,636693970496377375,0,4860,6,Sending response: 200.0 OK,
我错过了什么?我没有看到将addAzureWebAppDiagnostics() 呼叫添加到ILoggerFactory 的方法。请帮忙!
【问题讨论】:
-
当你说“我想发送相同的日志 Azure Blob 所以我配置”时,你在配置什么?您是否正在使用旧的日志系统,该系统使用带有
AzureWebJobsDashboard的 Azure 存储并希望将这些日志存储在 Azure Blob 而不是 Azure 表存储中......? -
是的。什么是新的日志系统?
-
新的日志系统使用App Insights。 App Insights 提供了更丰富的监控功能集,并且可以通过减少存储帐户的 I/O 来提高性能
标签: c# azure logging azure-blob-storage azure-functions