azure-functions-host icon indicating copy to clipboard operation
azure-functions-host copied to clipboard

Hyphen in environment variable

Open keidyz opened this issue 1 year ago • 0 comments

Let's say you have a function named foo-bar and want to mute the default azure information logs but not that function's information logs, you can do this in the host.json

{
  "version": "2.0",
  "logging": {
    "logLevel": {
      "Function": "Error",
      "Function.foo-bar": "Information"
    }
  }
}

Instead of modifying host.json, you can also use the following in the local.settings.json and it would work

'AzureFunctionsJobHost__logging__logLevel__Function': 'Error'
'AzureFunctionsJobHost__logging__logLevel__Function.foo-bar': 'Information'

But dots and hyphens are not allowed in app settings. How do you get around this?

keidyz avatar Feb 14 '24 07:02 keidyz