在使用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及錯誤代碼