未显示Azure功能应用程序日志 [英] Azure function apps logs not showing

查看:175
本文介绍了未显示Azure功能应用程序日志的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对Azure比较陌生,我刚刚完成了关于如何创建一个新的Azure函数的教程,该函数在创建新的blob时触发,并将其作为默认代码。

I'm relatively new to Azure and I just went through the tutorial on how to create a new Azure function, which is triggered when a new blob is created, and had this as the default code in it.

public static void Run(Stream myBlob, string name, TraceWriter log)
{
    log.Info($"C# Blob trigger function Processed blob\n Name:{name} \n Size: {myBlob.Length} Bytes");
}

从我在教程中看到的内容,我应该可以看到一些信息在代码下面的日志区域,但没有任何显示,我一直在检查一段时间的解决方案,但似乎无法找到任何有用的东西。

From what I can see on the tutorial, I should be able to see some information in the "logs" area below the code, but nothing shows up, I've been checking for a solution for a while now but can't seem to find anything useful.

任何帮助都将不胜感激。

Any help would be greatly appreciated.

推荐答案

日志窗口有点脆弱,并不总是显示日志。但是,日志也会写入日志文件。

The log window is a bit fragile and doesn't always show the logs. However, logs are also written to the log files.

您可以从Kudu控制台访问这些日志:
https:// [your-function-app] .scm.azurewebsites.net /

You can access these logs from the Kudu console: https://[your-function-app].scm.azurewebsites.net/

从菜单中选择调试控制台> CMD

From the menu, select Debug console > CMD

在文件列表中,进入LogFiles> Application> Functions> Function> [Name你的功能]

On the list of files, go into LogFiles > Application > Functions > Function > [Name of your function]

你会看到一个日志文件列表。

There you will see a list of log files.

这篇关于未显示Azure功能应用程序日志的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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