'View logging output from Azure function

I've been trying to make an Azure function.

How can I tell if it's running?

I'm using an ILogger to output log messages, so I expect to see them.

I was kind of also expecting a log of invocations and results.

Do such things exist?



Solution 1:[1]

Except the monitor of the azure function, you can also use logs in kudu to view the output of your azure function app.

And compared with the monitor of the azure function, kudu log files is more timely.

Just go to this url: https://yourfunctionappname.scm.azurewebsites.net/DebugConsole

And then go to D:\home\LogFiles\Application\Functions\Function\yourtriggername>, then you will find the log files. Monitor usually takes a certain time to display (usually 5 minutes), but the log file in kudu is real-time.

It is not recommended to use the ilogger module that comes with the azure function on the portal. It is very fragile and will not be displayed.

Solution 2:[2]

I have found success in this by navigating to

<my function app> ? Monitoring ? Log Stream

and then running my function. This will show all the messages <my function app> produces going forward. It does not show past messages. That is the drawback. It isn't useful for going back after an event occurred to determine the cause.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Cindy Pau
Solution 2 candlebar