Azure Function Context Log Location

Viewed 42

How do you view the context.log messages for an Azure Node.js Function?

If I have the following:

exports.handler = async (context) => {
    context.log.info('Hello Bob');
};

Where would I go to see Hello Bob?

I know exactly how to view such a phrase in AWS Cloudwatch but I cannot find the same in Azure. I have looked at: https://docs.microsoft.com/en-us/azure/azure-functions/functions-monitoring but it points to Application Insights which when I go there and look at say, Activity Logs, there is no information. I have also looked at Logs on that screen but it wants to run queries. So, how do you look at context.log.info data within Azure?

1 Answers

You can access that in the Azure Portal

It does not appear immediately. may take a couple of minutes after you run your function. also make sure the function has started

  1. Locate your Function app and click "Functions" > "your function name" > "Monitor" and any of the log records:

enter image description here

enter image description here

enter image description here

Or you can use the insights for that:

enter image description here

and enter image description here

Related