Do not show urllib3 logging level as part of the agent's configuration dump

This commit is contained in:
allegroai 2019-12-21 18:23:17 +02:00
parent ffe653afc6
commit 0a03dced50

View File

@ -206,6 +206,11 @@ class Session(_Session):
config.pop('env', None)
if remove_secret_keys:
recursive_remove_secrets(config, secret_keys=remove_secret_keys)
# remove logging.loggers.urllib3.level from the print
try:
config['logging']['loggers']['urllib3'].pop('level', None)
except (KeyError, TypeError, AttributeError):
pass
config = ConfigFactory.from_dict(config)
self.log.debug("Run by interpreter: %s", sys.executable)
print(