summaryrefslogtreecommitdiff
path: root/setuptools/logging.py
diff options
context:
space:
mode:
Diffstat (limited to 'setuptools/logging.py')
-rw-r--r--setuptools/logging.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/setuptools/logging.py b/setuptools/logging.py
index dbead6e6..56669c96 100644
--- a/setuptools/logging.py
+++ b/setuptools/logging.py
@@ -24,6 +24,12 @@ def configure():
format="{message}", style='{', handlers=handlers, level=logging.DEBUG)
monkey.patch_func(set_threshold, distutils.log, 'set_threshold')
+ # For some reason `distutils.log` module is getting cached in `distutils.dist`
+ # and then loaded again when we have the opportunity to patch it.
+ # This implies: id(distutils.log) != id(distutils.dist.log).
+ # We need to make sure the same module object is used everywhere:
+ distutils.dist.log = distutils.log
+
def set_threshold(level):
logging.root.setLevel(level*10)