I'm developing / debugging my Function App locally on mac High Sierra by azure-functions-core-tools v2.2.70. My app is based on Node.js 8.11.1.
When my app is published on Azure, I can get the logs which are logged by context.log("sample message")
, however, while running the app locally by func host start
, I don't see any of my customs logs. That is, if I log something by context.log or console.log, I will not see it.
I even tried NODE_OPTIONS=--inspect func host start
, but even that didn't help.
Can you please tell me how can I get my custom logs? Because without logging, debugging gets difficult.
FYI, in my host.json, I have following:
{
"version": "2.0",
"tracing": {
"consoleLevel": "verbose"
},
"logging": {
"fileLoggingMode": "always"
}
}
This worked for me:
{
"version": "2.0",
"logging": {
"logLevel": {
"default": "Debug"
}
}
}
It allowed me to see log output in the terminal when starting with func host start
(CLI)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With