Home > Software engineering >  Azure function v 2.0 not showing verbose messages when logLevel is set to Debug
Azure function v 2.0 not showing verbose messages when logLevel is set to Debug

Time:03-12

I've been experiencing this issue since a couple of hours now.

Context: I'm running an Azure Function v2.0 project in nodejs v12 LTS and I'm using VS Code Debugger with the --verbose flag to debug my application

When I set the logLevel to Debug I never see the output of the context.log.verbose inside a function.

This is what my host.json file looks like:

{
  "version": "2.0",
  "logging": {
      "logLevel": {
          "default": "Debug"
      }
  }
}

PS: I'm not able to see the verbose messages too on the App Insights in the Azure portal

CodePudding user response:

You need to set the logLevel to trace for context.log.verbose or you can use context.log.info with Debug logLevel.

After that is set correctly, you will be able to see the log in the App Insights. Example below: enter image description here

CodePudding user response:

see this question Azure function verbose trace logging to Application Insights

  • Related