Troubleshooting Log Stream data not loading/populating in App Services

  • Thread starter Thread starter RineshSPotty
  • Start date Start date
R

RineshSPotty

Overview

Before you stream logs in real-time, enable the log type that you want. Any information written to the console output or files ending in .txt, .log, or .htm that are stored in the /home/LogFiles directory (D:\home\LogFiles) is streamed by App Service.



Note: Some types of logging buffer write to the log file, which can result in out of order events in the stream. For example, an application log entry that occurs when a user visits a page may be displayed in the stream before the corresponding HTTP log entry for the page request.



In Azure portal

To stream logs in the Azure portal, navigate to your app and select Log Stream.



Troubleshooting Steps
Check Access to the kudu site.




  • The Log Stream fetches the data from kudu site, and it is important to have access to the kudu site.
  • To access Kudu, you need to be a member of a built-in or custom role.
    • If using a built-in role, you must be a member of Website Contributor, Contributor, or Owner.
    • If using a custom role, you need the resource provider operation: Microsoft.Web/sites/publish/Action

RBAC permissions required to access Kudu



Accessing log stream when private endpoints or access restrictions are enabled.



If you are trying to access the log stream through the portal and the app service has a private endpoint/access restriction enabled, then check whether the log stream is accessed from the same network (in case a private endpoint is enabled) or from the whitelisted network (in case access restriction is enabled).



Troubleshooting access to the log stream for Apps in ASE.


  • If you are trying to access the log stream in the App Service environment, then you can access the log stream from the same network only.


  • Log stream blade will be greyed out on the app services when accessing through the Azure portal, but you can right-click on it and open the log stream in a new tab to access it.

Screenshots below:

Log Stream blade greyed out:

medium?v=v2&px=400.png



Log Stream blade where we are able to see the data by right clicking and opening in new tab:

medium?v=v2&px=400.png



References

Stream logs

Continue reading...
 
Back
Top