Azure Function Log Stream not loading

nicholas@phdsoft.com 0 Reputation points
2023-10-02T15:27:15.53+00:00

I have a function running through Azure Portal. The problem is, something is going wrong with it and I can't investigate the problem because the section 'Log Stream' never loads for me. I see the spinning circle, but it stays like that forever, even after waitng five minutes and trying multiple browswer and private mode. Does ayone have any idea what could be causing this? Other people with less permissions from my organization can access it normally.

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,348 questions
{count} votes

1 answer

Sort by: Most helpful
  1. navba-MSFT 17,385 Reputation points Microsoft Employee
    2023-10-03T04:46:30.56+00:00

    @nicholas@phdsoft.com Welcome to Microsoft Q&A Forum, Thank you for posting your query here!

    I understand that you are unable to load the "Log Stream" section of an Azure Function running through the Azure Portal. Also the other people with fewer permissions from the same organization can access it normally.

    Please follow the below action plans:

    **Plan 1:**Could you please check if the logs are written to the logfiles ?

    You can access these logs from the Kudu console: https://[your-function-app].scm.azurewebsites.net/

    From the menu, select Debug console --> CMD

    On the list of files, go into LogFiles --> Application --> Functions > Function > [Name of your function]

    Here you will see a list of log files open it and check if you see most recent logs here.

    Plan 2:

    Try navigating to your Function inside the Function APP. Click on Monitor and select the Logs tab as shown below:

    User's image

    Plan 3:
    As a workaround, Could you click on the Application Insights tab and then check your logs directly from AppInsights ?
    User's image

    Plan 4:
    Could you please check if you have the right and valid APPINSIGHTS_INSTRUMENTATIONKEY and APPLICATIONINSIGHTS_CONNECTION_STRING under the App Settings

    User's image

    Plan 5:

    Can you confirm if you're experiencing this issue with all your Azure Functions or just this specific one?

    Plan 6:
    Could you try accessing it completely from a different network ? Just to isolate any proxy / firewall related network issues.

    Plan 7:

    Alternatively try func azure functionapp logstream command which connects the local command prompt to streaming logs for the function app in Azure. More info here.

    On a side note:
    The host.json file configuration determines how much logging a functions app sends to Application Insights. Please check if you have entered the right set of logLevels as explained here.

    Sample host.json for Azure function v2, which can log trace messages to Application Insights:

    
    
    {
      "version": "2.0",
      "logging": {
        "fileLoggingMode": "always",
        "logLevel": {
          "default": "Information",
          "Host.Results": "Error",
          "Function": "Trace",
          "Host.Aggregator": "Trace"
        }
      }
    }
    

    If you have any questions on this, please let me know. I would be happy to assist.

    **

    Please do not forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.