Docker App:诊断日志链接已禁用 [英] Docker App: Diagnostics Logs Link Disabled

查看:139
本文介绍了Docker App:诊断日志链接已禁用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hello,

我已经创建了一个发布为Docker容器(即OS = Linux,Publish ='Docker Image')发布的Azure Function应用,其中相应的Docker镜像托管在Azure容器注册表中.

I have created a Azure Function App that is published as a Docker Container (i.e, OS=Linux, Publish='Docker Image'), where corresponding the docker image is hosted on Azure Container Registry.

我一直试图找到一个地方来查看由应用程序内的函数生成的日志消息.我注意到诊断日志"我的应用程序设置中的链接被禁用.同样在kudu上/home/LogFiles/的日志文件中(< app_name> .scm.azurewebsites.net/), 我看到以下消息:

I have been trying to find a place to view the log messages generated from functions within the app. I noticed that "Diagnostics logs" link in my applications settings is disabled. Also in the log files from /home/LogFiles/ on kudu (<app_name>.scm.azurewebsites.net/), I see messages such as:

2018-10-09 05:14:50.993 INFO - Logging is not enabled for this container. Please use https://aka.ms/linux-diagnostics to enable logging to see container logs here.

谁能建议我如何启用该应用程序的日志记录,以便可以找到从我的函数生成的日志消息(在容器中运行)?

Can anyone advise me on how do I enable logging for the app so that log messages generated from my functions (running within the container) can be found?

谢谢.

推荐答案

如果您点击该链接,便可以从容器中看到标准输出日志.

If you follow that link you'll be able to see the stdout logs from your container.

如果要查找功能特定的日志,即:在功能中写入ILogger的日志或功能中的事件,则应检查Application Insights(

If you're looking for functions specific logs, i.e: logs written to ILogger in your function or events from your function, you should check Application Insights (see this for details)

如果您要从函数应用程序中查找文件日志,请在host.json中启用文件日志,那么日志应该位于/home/LogFiles/Application/Functions/

If you're looking for file logging from your function app, enable file logging in your host.json, then the logs should be present at /home/LogFiles/Application/Functions/


这篇关于Docker App:诊断日志链接已禁用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆