Azure-functions-core-tools: Unable to override loglevel in local.settings.json

Created on 10 Sep 2020  路  4Comments  路  Source: Azure/azure-functions-core-tools

Reading all the docs on this I should be able to override my default loglevel locally but it seems the setting isn't getting picked up for some reason.

host.json

{
  "version": "2.0",
  "functions": [ "RunSnapshot" ],
  "logging": {
    "logLevel": {
      "Default": "Information",
    },
    "applicationInsights": {
      "samplingExcludedTypes": "Request",
      "samplingSettings": {
        "isEnabled": true
      }
    }
  }
}

local.settings.json

{
  "IsEncrypted": false,
  "Values": {

    "FUNCTIONS_WORKER_RUNTIME": "dotnet",
    "AzureFunctionsJobHost__logging__logLevel__Default": "Debug",

  }
}

Yet despite me setting the level to debug in local.settings.json my app is still logging at information level. I can see if I alter the setting in host.json I get the expected output. Is this a bug or can someone point me at what I'm doing wrong here?

Azure Functions Core Tools (3.0.2881 Commit hash: fa9641ad925588192888bc977ff51d8a63536267)
Function Runtime Version: 3.0.14287.0

bug

Most helpful comment

Thanks for reporting. This is a bug. I have triaged the issue and assigned to next milestone.

All 4 comments

Agreed that this should work. @pragnagopa

Thanks for reporting. This is a bug. I have triaged the issue and assigned to next milestone.

@pragnagopa I've updated to the latest version but I'm still experiencing this issue?

Azure Functions Core Tools (3.0.2912 Commit hash: bfcbbe48ed6fdacdf9b309261ecc8093df3b83f2)
Function Runtime Version: 3.0.14287.0

@sonic1981 - fixes are not released to npm yet. Until we update the tooling, please use artifacts for the release: https://github.com/Azure/azure-functions-core-tools/releases/tag/3.0.2931

Was this page helpful?
0 / 5 - 0 ratings