]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
Silence urllib3 logging whether it's bundled in requests or not 522/head
authorDan Mick <dan.mick@redhat.com>
Fri, 12 Jun 2015 21:26:36 +0000 (14:26 -0700)
committerDan Mick <dan.mick@redhat.com>
Wed, 17 Jun 2015 01:35:32 +0000 (18:35 -0700)
Also, do it only in teuthology/__init__.py

Signed-off-by: Dan Mick <dan.mick@redhat.com>
teuthology/__init__.py
teuthology/lock.py
teuthology/report.py

index 8144418c87b89c9329a436267caae9e77f7f50ef..d0bcfc0ab2f86bb3ba417d9ac44c01135f4c338d 100644 (file)
@@ -21,6 +21,9 @@ if os.path.split(exec_dir)[-1] == 'bin' and exec_dir not in os.environ['PATH']:
 # We don't need to see log entries for each connection opened
 logging.getLogger('requests.packages.urllib3.connectionpool').setLevel(
     logging.WARN)
+# if requests doesn't bundle it, shut it up anyway
+logging.getLogger('urllib3.connectionpool').setLevel(
+    logging.WARN)
 
 logging.basicConfig(
     level=logging.INFO,
index 0d100981ad2bb1bf956082d8284b8a74bf1e18ab..9b5796669afcd5b4f9521e86b4aa68d97b6a6966 100644 (file)
@@ -16,9 +16,6 @@ from .config import config
 from .lockstatus import get_status
 
 log = logging.getLogger(__name__)
-# Don't need to see connection pool INFO messages
-logging.getLogger("requests.packages.urllib3.connectionpool").setLevel(
-    logging.WARNING)
 
 is_vpm = lambda name: 'vpm' in name
 
index 48fed5cab3f34e043cfb1295a564e8756366f86c..e56d1422f4310ebbada1c3c09fedc97dd1d5210e 100644 (file)
@@ -20,10 +20,6 @@ def init_logging():
 
     :returns: a logger
     """
-    # Don't need to see connection pool INFO messages
-    logging.getLogger("requests.packages.urllib3.connectionpool").setLevel(
-        logging.WARNING)
-
     log = logging.getLogger(__name__)
     return log