Azure-functions-core-tools: Unexpected verbose/informational logging in latest core tools release

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

Issue

There are two issues that I'm seeing related to custom log sources in the latest core tools release - i.e. logs written from ILogger instances created by ILoggerFactory.CreateLogger(...).

  1. When I configure log levels for my various log sources, no matter what value I specify, I see Verbose logs written to the console. My expectation is that the log level I specify in host.json would be honored (this is similar to #2216 but slightly different because I see verbose logs regardless of what I have configured for the default logging level).
  2. If I don't configure _any_ log levels for my various log sources, then I see Informational logs written to the console. This seems like a regression from previous releases, where I wouldn't see any log output from my custom log sources unless explicitly configured (and I preferred that behavior).

Core Tools Version

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

Repro Steps

You can use the Durable Functions precompiled sample app to see this behavior. This is the default host.json logging configuration you should see in the sample app (I removed some of the irrelevant parts):

{
  "version": "2.0",
  "logging": {
    "logLevel": {
      "DurableTask.AzureStorage": "Warning",
      "DurableTask.Core": "Warning"
    }
  }
}
  1. Use F5 in Visual Studio to start the sample app.
  2. [Repro for (1) above] Notice the mix of blue and green logs that get emitted. These are Informational and Verbose logs emitted by the DurableTask.AzureStorage and DurableTask.Core log sources in the Durable Functions extension.

image

  1. Update the host.json file by removing the logging section entirely.

  2. [Repro for (2) above] Notice the blue logs that get emitted. These are Informational logs emitted by the Durable Functions DurableTask.AzureStorage log source and I don't expect them to be visible by default.

image

Again, in previous versions I didn't see this output by default, and my hope is that we can restore the previous behavior in terms of default log verbosity for custom log providers.

Most helpful comment

@cgillum points are way more important - but also would love to pop back in the ASCII art by default. Happy to open a separate issue for discussion on that one (I鈥檓 truthfully ok if we feel it鈥檚 better to not have it, but my vote is for ASCII)

All 4 comments

@cgillum points are way more important - but also would love to pop back in the ASCII art by default. Happy to open a separate issue for discussion on that one (I鈥檓 truthfully ok if we feel it鈥檚 better to not have it, but my vote is for ASCII)

@jeffhollan Yeah probably open a separate issue. I think it should be off by default but allow it to enable via an environment variable.

Thanks for the detailed repro @cgillum ! I sent a PR with the fix. Will try to get in the fix for the next core tools release.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

SteveALee picture SteveALee  路  4Comments

frozenbubble picture frozenbubble  路  4Comments

RealLucasMeyer picture RealLucasMeyer  路  6Comments

brandonh-msft picture brandonh-msft  路  4Comments

dstaley picture dstaley  路  3Comments