【Azure 应用服务】当在Azure App Service的门户上 Log Stream 日志无输出,需要如何操作让其输出Application Logs呢?

问题描述

在Azure App Service的门户上 Log Stream 日志无输出,需要如何操作让其输出Application Logs呢?

如下图所示:

问题解答

请注意,上图中提示说:Application logs are switched off.  You can turn them on using the App Service Logs Settings. 应用日志关闭,可以通过App Service Logs 页面来设置开启。

App Service —> App Service Logs :  针对Application Logging 和 Web Server Logging 为On,最后点击页面上的Save按钮。

保存后,返回Log Stream页面,就可以实时查看App Service中的输出日志:

附录1:.NET API下的日志输出示例