简体   繁体   English

Azure功能-日志合并-控制主机日志?

[英]Azure Functions - Logging Consolidation - Controlling the host log?

I run a system on top of a bunch of Azure Functions and I'm just tidying some last threads up. 我在大量Azure函数之上运行系统,而我只是整理一些最后的线程。 I mostly abandoned the logging provided out of the box by Azure functions because I found the flush timings to be super irregular and I also wanted to consolidate the logs from all of my functions into one spot and be able to query them. 我主要放弃了Azure函数提供的开箱即用的日志记录,因为我发现刷新时间安排非常不规则,并且我还希望将所有功能中的日志整合到一个位置并能够查询它们。 This all works for the most part but I have one annoying use-case remaining where if a function binding is faulty (eg the azure function method signature is wrong because someone checked garbage into Git) the function won't be invoked and even the log for the function wont be invoked but the error will instead be placed into a different file (the host log). 所有这些在大多数情况下都有效,但是我剩下一个烦人的用例:如果函数绑定错误(例如,由于有人将垃圾检入了Git,Azure函数方法签名是错误的),该函数将不会被调用,甚至日志该函数将不会被调用,但是错误将被放置到另一个文件(主机日志)中。

Now I guess I can just access the storage account that backs up the azure function and pull the host log from there but I was wondering if there was a better means of directly controlling/intercepting the logging in Azure Functions. 现在,我想我可以访问备份azure功能的存储帐户并从那里获取主机日志,但是我想知道是否有更好的方法直接控制/拦截Azure Functions中的日志记录。 Does anyone know if there is at least a way of getting it to flush more quickly? 有谁知道是否至少有一种更快地冲洗它的方法?

您可以在关联的Application Insights中查看主机日志以及功能日志: https : //docs.microsoft.com/zh-cn/azure/azure-functions/functions-monitoring#other-categories

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM