Azure Web App跟踪日志未出现在日志中 [英] Azure Web App Trace logs not appearing in log

查看:72
本文介绍了Azure Web App跟踪日志未出现在日志中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Azure Web App应用程序日志记录,并且遵循了在线教程,并进行了以下设置:

I am using Azure Web App Application Logging, and I followed the online tutorial, and made the following setup:

我遇到异常,在我的catch块中,我有以下代码:

I get an exception and in my catch block I have the following code:

Trace.TraceError("abc");
Trace.TraceInformation("abc");
Trace.TraceWarning("abc");
Trace.WriteLine("abc");
Console.WriteLine("abc");

在日志中,我得到这个:

In the logs I get this:

2017-02-13 03:30:14〜1ENGINEMAILERAPI GET/api/vfs/site/wwwroot/ _ = 1486950157594& X-ARR-LOG-ID = 149fee3f-8da3-460e-816e-10e7a4b95f1d 443-121.121.23.217 Mozilla/5.0 +(Windows + NT + 6.3; + Win64; + x64)+ AppleWebKit/537.36 +(KHTML ,+ like + Gecko)+ Chrome/56.0.2924.87 + Safari/537.36 - https://web1.appsvcux.ext.azure.com/websites/WebsitesContent/WebsitesIndex?cacheability=3&defaultCloudName=azure&扩展名= WebsitesExtension& shellVersion = 5.0.302.608%20(production%233ec7ddd.170201-1022)& traceStr =& region = southeastasia& flight = 0& defaultCacheEvictionDelay = 105000& websitesextension_enablemonitoringgroup = true& websitesextension_newaudit s = true& websitesextension_resourcemenu = true& websitesextension_seetemplate = true& pageVersion = 5.12.32.464175.170208-1137& l = zh.zh-cn& trustedAuthority = portal.azure.com enginemailerapi.scm.azurewebsites.net 200 0 0 992 1923 62

2017-02-13 03:30:14 ~1ENGINEMAILERAPI GET /api/vfs/site/wwwroot/ _=1486950157594&X-ARR-LOG-ID=149fee3f-8da3-460e-816e-10e7a4b95f1d 443 - 121.121.23.217 Mozilla/5.0+(Windows+NT+6.3;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/56.0.2924.87+Safari/537.36 - https://web1.appsvcux.ext.azure.com/websites/WebsitesContent/WebsitesIndex?cacheability=3&defaultCloudName=azure&extensionName=WebsitesExtension&shellVersion=5.0.302.608%20(production%233ec7ddd.170201-1022)&traceStr=&region=southeastasia&flight=0&defaultCacheEvictionDelay=105000&websitesextension_enablemonitoringgroup=true&websitesextension_newauditlogs=true&websitesextension_resourcemenu=true&websitesextension_seetemplate=true&pageVersion=5.12.32.464175.170208-1137&l=en.en-us&trustedAuthority=portal.azure.com enginemailerapi.scm.azurewebsites.net 200 0 0 992 1923 62

如何显示我的应用程序日志?

How can I get my application logging to show up?

推荐答案

根据您提供的错误消息的日志格式,我假设您提供的日志文件属于 Web服务器日志(在/LogFiles/http/RawLogs下),其格式为 W3W正在记录.根据您的配置,您同时启用了文件系统和Blob存储以进行应用程序日志记录.您可以按以下方式检索应用程序日志:

According to the log format of error message you provided, I assumed that the log file you provided is belongs to Web Server Logs ( under /LogFiles/http/RawLogs) which formatted using W3W Logging. Based on your configuration, you have both enabled file system and blob storage for Application Logging. You could retrieve your application logs as follows:

应用程序日志记录(文件系统)

以一种简单的方式,您可以利用 KUDU ,单击调试控制台> CMD"和cd LogFiles\Application,然后可以按以下方式检索日志:

For a simple way, you could leverage KUDU, click "Debug console > CMD" and cd LogFiles\Application, then you could retrieve your logs as follows:

应用程序日志记录(Blob)

您可以利用 Microsoft Azure Storage Explorer 来检索日志,如下所示:

You could leverage Microsoft Azure Storage Explorer to retrieve your logs as follows:

更新:

这篇关于Azure Web App跟踪日志未出现在日志中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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