在使用Azure App Service时候,咱们有时候对 一些请求发生错误毫无头绪,能从错误代码中知道请求错误,可是更多的信息呢? 当咱们须要更多的信息时候,一般有如下的一些方式来查找问题:jquery
可是,Azure App Service做为PaaS服务(平台即服务),提供了很是有帮助的错误请求日志 - FREB日志。 如下的内容就介绍如何开启Freb日志,如何查看日志,及在日志中能发现有用的信息。web
进入App Service的App Service logs页面,开启Failed request tracing。浏览器
Failed Request Trackingapp
Detailed information on failed requests including the web server components which were used to process the request and time that was taken to process the request.ide
Detailed Error Messages
If the error code is greater than 400, the app service can store the HTML pages which otherwise would have been sent to the client. These pages can be useful to identify / troubleshoot the error.spa
一:登陆Kudu站点 (App Service --> Advanced Tools 页面 --> GO 或者在app Service的URL中添加.scm,如:https://xxxxxxxxxxxx.scm.chinacloudsites.cn)3d
二:进入D:\home\LogFiles\W3SVC开头的目录,选中如错误请求时间点匹配的文件,点击右边的“下载按钮”,FREB日志显示为可阅读格式。日志
(注:如须要拷贝出去,当须要友好的阅读体验时,也须要在同一目录文件中包含freb.xml文件)code
查看Request在IIS中最终所到达时候的Header信息,是否有缺乏默写敏感的信息,如Authorization。component
查看Request的所经历的Module及错误代码