Skip to content

Conversation

@jiasli
Copy link
Member

@jiasli jiasli commented Nov 11, 2020

In track 2 SDKs, logging_policy and http_logging_policy are configurable via kwargs passed to SubscriptionClientConfiguration.__init__:

self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs)
self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs)

Azure Identity hard-codes HttpLoggingPolicy while creating policies, making it impossible to replace HttpLoggingPolicy with SansIOHTTPPolicy without overriding the whole policies. (I have to override the whole policies in order to replace HttpLoggingPolicy with SansIOHTTPPolicy.)

policies = [
ContentDecodePolicy(),
config.user_agent_policy,
config.proxy_policy,
config.retry_policy,
config.logging_policy,
DistributedTracingPolicy(**kwargs),
HttpLoggingPolicy(**kwargs),
]

Azure Identity should follow the same pattern and make individual policies configurable, especially for http_logging_policy which is required for Azure CLI to disable logs from HttpLoggingPolicy, as it is a redacted/duplicated version of NetworkTraceLoggingPolicy.

More detail

@ghost ghost added the Azure.Identity label Nov 11, 2020
@jiasli jiasli requested review from chlowell and lmazuel November 11, 2020 04:15
@chlowell
Copy link
Member

chlowell commented Jun 9, 2021

Closing this because I believe you no longer require it, please reopen if I'm mistaken.

@chlowell chlowell closed this Jun 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants