Azure / Azure/azure-sdk-for-python

Set the logging level in azure/core/pipeline/policies/_universal.py to DEBUG

Open
#37,775 7 comments 2 reactions 4 assignees Claimed by @kashifkhan View on GitHub
Azure.Core Client customer-reported feature-request needs-team-attention
Dominant language
Python
Stars
5.6k
Forks
3.4k
Avg merge
1d 21h
Merged PRs (30d)
193

Description

**Is your feature request related to a problem? Please describe.**

When I retrieve secrets from the keyvault I receive a very long list of GET requests, containing the request URL, the request method, its headers, etc.. Normally I do not need this information in my INFO log, because there is not much value in it. This also means that methods that use a lot of requests that require connections will also flood my logs with connection requests and responses.

**Describe the solution you'd like**
I would like to set the loglevel to DEBUG in policies/_universal.py. This means that the connection request will only be a one liner and still tell me about the success of the operation.

**Describe alternatives you've considered**
The current alternative is, that in each container created I run the command

`sed -i 's/logging.INFO/logging.DEBUG/g' /venv/lib/python3.11/site-packages/azure/core/pipeline/policies/_universal.py`

That replaces the INFO level in the code with DEBUG manually.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.