SOLVED

Function apps - where do log messages go?

New Contributor

Probably a basic question, but in the sample PowerShell 'hello world' code that you get when you create a new function, there is this line:

 

Write-Host "PowerShell timer trigger function ran! TIME: $currentUTCtime"
 
When I run the function, I cannot see where this is output to. The application insights log shows messages relating to executing the function, but I cannot find the above message anywhere. What am I missing?
 
 
1 Reply
best response confirmed by sayedimac (Learning Expert)
Solution

@DarrenMArdex 

 

This information is written to the Information Log that needs to be configured for the function app.

If you are debugging using the Azure Function Core Tools utility, it will simply log this to the console.


See this link for the different types of logging levels and PowerShell commands.

sayedimac_0-1665593542892.png

 

You can then monitor the logs as outlined here.

Hope this helps!

 

- Johan