This repository is for active development of the Azure SDK for .NET. For consumers of the SDK we recommend visiting our public developer docs at https://learn.microsoft.com/dotnet/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-net.
MIT License
5.24k
stars
4.58k
forks
source link
[BUG] Unable to suppress BlobClient log entries #43651
We use the BlobClient extensively in our Azure Durable Function but our logs in Application Insights are full of trace warnings like Error response [some guid] 409 The specified container already exists and Error response [some guid] 404 The specified blob does not exist., which we would like to suppress.
We've tried raising the severity level threshold of the loggers in the function environment variables in Azure by adding
AzureFunctionsJobHost__logging__logLevel__Azure.Core = Error and AzureFunctionsJobHost__logging__logLevel__Azure.Blob.Storage = Error but to no avail
Expected behavior
Environment variables log level settings should be respected by the Azure SDK
Actual behavior
Log warning entries appear in logs regardless of specifying log level thresholds in environment variables in Azure
Reproduction Steps
In code:
var container = new BlobContainerClient(connectionString, "distributed-lock-leases");
container.CreateIfNotExists(); // when container does already exist
Library name and version
Azure.Storage.Blobs 12.9.1
Describe the bug
We use the
BlobClient
extensively in our Azure Durable Function but our logs in Application Insights are full of trace warnings likeError response [some guid] 409 The specified container already exists
andError response [some guid] 404 The specified blob does not exist.
, which we would like to suppress.We've tried raising the severity level threshold of the loggers in the function environment variables in Azure by adding
AzureFunctionsJobHost__logging__logLevel__Azure.Core = Error
andAzureFunctionsJobHost__logging__logLevel__Azure.Blob.Storage = Error
but to no availExpected behavior
Environment variables log level settings should be respected by the Azure SDK
Actual behavior
Log warning entries appear in logs regardless of specifying log level thresholds in environment variables in Azure
Reproduction Steps
In code:
In environment variables:
Environment
Azure Durable Function running on .NET 7 in Azure with the following packages (among others):
Microsoft.Azure.Functions.Worker 1.21.0 Microsoft.Azure.Functions.Worker.Extensions.DurableTask 1.1.2 Microsoft.Azure.Functions.Worker.Sdk 1.17.2 Azure.Core 1.38.0 Azure.Storage.Blobs 12.9.1 Azure.Storage.Common 12.8.1 Microsoft.Azure.DurableTask.Core 2.16.2 Microsoft.Azure.Functions.Worker.Core 1.17.0 Microsoft.DurableTask.Abstractions 1.2.2 Microsoft.DurableTask.Client 1.2.2 Microsoft.DurableTask.Worker 1.2.2 Microsoft.Extensions.Azure 1.7.2