未显示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.