Search code examples
azureazure-web-app-serviceazure-managed-app

Why it is impossible to access LogStream of a Managed Application App Service?


We have a managed application published in Microsoft Partner Center, for preview audience.

We have both publisher and client tenants. After installing the app into the client's tenant I can't access the log steam of the installed app from either publisher / client tenants. When I'm trying to open Log Stream i can see only "connecting....".

Previously, as i have described here, we were able to access logstream using Visual Studio. However, Visual Studio log stream has stopped working as well.

We cannot access log stream at all!

Why this is happening and how can i access log stream of a Managed Application App Service?

Web Log Stream VisualStudio Code Log Stream


Solution

  • I have referred the MSDoc which is provided in the Managed Applications in Azure Portal.

    enter image description here

    • I have created a managed Application using the ARM Template.

    • Enable the App Service Logs and the required Level of Logging.

    enter image description here

    • Iam able to see the Logs from Log Stream.

    enter image description here

    how can i access log stream of a Managed Application App Service?

    We can use Azure CLI command to check the Logs.

    az webapp log tail --name YourAppName --resource-group RGName
    
    2023-09-26T12:05:16  Welcome, you are now connected to log-streaming service. The default timeout is 2 hours. Change the timeout with the App Setting SCM_LOGSTREAM_TIMEOUT (in seconds). 
    2023-09-26 12:05:05 ~**** GET /api/deployments/ $orderby=ReceivedTime%20desc&$top=20&api-version=2022-03-01&X-ARR-LOG-ID=1f24b085-e6a8-4b78-87ae-215dcb4e1648 443 - 13.66.140.0 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/117.0.0.0+Safari/537.36+Edg/117.0.2045.43 - https://edge.management.azure.com/subscriptions/****/resourceGroups/****/providers/Microsoft.Web/sites/****/deployments?$orderby=ReceivedTime%20desc&$top=20&api-version=2022-03-01 ****.scm.azurewebsites.net 200 0 0 781 7791 33
    2023-09-26 12:05:10 **** GET / X-ARR-LOG-ID=cec75a96-a5c8-47c4-ba94-b935331a0ecf 443 - 115.110.154.186 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/117.0.0.0+Safari/537.36+Edg/117.0.2045.43 - https://sandbox-97-2.reactblade-ms.portal.azure.net/ ****.azurewebsites.net 200 0 0 2136 1544 1594
    2023-09-26 12:05:11 **** GET / X-ARR-LOG-ID=6438e91b-cd03-4ec5-ba0e-b258b9ce7e1f 443 - 65.154.226.169 Mozilla/5.0+(Windows+NT+10.0)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/106.0.0.0+Safari/537.36 - http://****.azurewebsites.net ****.azurewebsites.net 200 0 0 1851 1037 12