File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed
sdk/ai/azure-ai-projects/azure/ai/projects Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change 3333)
3434if _console_logging_enabled :
3535 import sys
36-
36+ # Enable detailed console logs across Azure libraries
3737 azure_logger = logging .getLogger ("azure" )
3838 azure_logger .setLevel (logging .DEBUG )
3939 azure_logger .addHandler (logging .StreamHandler (stream = sys .stdout ))
40+ # Exclude detailed logs for network calls associated with getting Entra ID token.
4041 identity_logger = logging .getLogger ("azure.identity" )
4142 identity_logger .setLevel (logging .ERROR )
43+ # Make sure regular (redacted) detailed azure.core logs are not shown, as we are about to
44+ # turn on non-redacted logs by passing 'logging_enable=True' to the client constructor
45+ # (which are implemented as a separate logging policy)
46+ logger = logging .getLogger ("azure.core.pipeline.policies.http_logging_policy" )
47+ logger .setLevel (logging .ERROR )
4248
4349
4450def _patch_user_agent (user_agent : Optional [str ]) -> str :
Original file line number Diff line number Diff line change 3434)
3535if _console_logging_enabled :
3636 import sys
37-
37+ # Enable detailed console logs across Azure libraries
3838 azure_logger = logging .getLogger ("azure" )
3939 azure_logger .setLevel (logging .DEBUG )
4040 azure_logger .addHandler (logging .StreamHandler (stream = sys .stdout ))
41+ # Exclude detailed logs for network calls associated with getting Entra ID token.
4142 identity_logger = logging .getLogger ("azure.identity" )
4243 identity_logger .setLevel (logging .ERROR )
44+ # Make sure regular (redacted) detailed azure.core logs are not shown, as we are about to
45+ # turn on non-redacted logs by passing 'logging_enable=True' to the client constructor
46+ # (which are implemented as a separate logging policy)
47+ logger = logging .getLogger ("azure.core.pipeline.policies.http_logging_policy" )
48+ logger .setLevel (logging .ERROR )
4349
4450
4551class AIProjectClient (AIProjectClientGenerated ): # pylint: disable=too-many-instance-attributes
You can’t perform that action at this time.
0 commit comments