Using logging.basicConfig(level=logging.INFO) mutates the root logger for the current Python interpreter. This means that any library which imports the pydocumentdb library will have its log level set to INFO which leads to unexpected behavior.
To fix this unexpected behavior, this commit introduces a new logger that's specific to the endpoint discovery retry policy and only mutates the log level of that specific logger.
Using
logging.basicConfig(level=logging.INFO)
mutates the root logger for the current Python interpreter. This means that any library which imports the pydocumentdb library will have its log level set toINFO
which leads to unexpected behavior.Some libraries even have tests to defend against this behavior, e.g. Celery: https://github.com/celery/celery/blob/120770929f/t/unit/conftest.py#L231-L244
To fix this unexpected behavior, this commit introduces a new logger that's specific to the endpoint discovery retry policy and only mutates the log level of that specific logger.