diff options
author | Cory Benfield <lukasaoz@gmail.com> | 2016-09-05 17:25:16 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-09-05 17:25:16 +0100 |
commit | 4addc8a34983a408ddb3e33a3fc76d86aeff04ba (patch) | |
tree | dcb539c9030ba2f8840aaaebfc147ad5f98d0704 | |
parent | 75be152649d5a3b053382fd9c556ad7cf23b0b37 (diff) | |
parent | da128b57c4d54e0e1ed5ab281c20a8dfbc50d892 (diff) | |
download | urllib3-4addc8a34983a408ddb3e33a3fc76d86aeff04ba.tar.gz |
Merge pull request #967 from Lukasa/springjools-master
Lower log levels from connectionpool.
-rw-r--r-- | CHANGES.rst | 3 | ||||
-rw-r--r-- | urllib3/connectionpool.py | 14 |
2 files changed, 10 insertions, 7 deletions
diff --git a/CHANGES.rst b/CHANGES.rst index f4ce35f5..975c4222 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -43,6 +43,9 @@ dev (master) * Implemented ``enforce_content_length`` to enable exceptions when incomplete data chunks are received. (PR #949) +* Dropped connection start, dropped connection reset, redirect, forced retry, + and new HTTPS connection log levels to DEBUG, from INFO. (PR #967) + * ... [Short description of non-trivial change.] (Issue #) diff --git a/urllib3/connectionpool.py b/urllib3/connectionpool.py index d7362d5d..13563ca1 100644 --- a/urllib3/connectionpool.py +++ b/urllib3/connectionpool.py @@ -208,8 +208,8 @@ class HTTPConnectionPool(ConnectionPool, RequestMethods): Return a fresh :class:`HTTPConnection`. """ self.num_connections += 1 - log.info("Starting new HTTP connection (%d): %s", - self.num_connections, self.host) + log.debug("Starting new HTTP connection (%d): %s", + self.num_connections, self.host) conn = self.ConnectionCls(host=self.host, port=self.port, timeout=self.timeout.connect_timeout, @@ -244,7 +244,7 @@ class HTTPConnectionPool(ConnectionPool, RequestMethods): # If this is a persistent connection, check if it got disconnected if conn and is_connection_dropped(conn): - log.info("Resetting dropped connection: %s", self.host) + log.debug("Resetting dropped connection: %s", self.host) conn.close() if getattr(conn, 'auto_open', 1) == 0: # This is a proxied connection that has been mutated by @@ -686,7 +686,7 @@ class HTTPConnectionPool(ConnectionPool, RequestMethods): raise return response - log.info("Redirecting %s -> %s", url, redirect_location) + log.debug("Redirecting %s -> %s", url, redirect_location) return self.urlopen( method, redirect_location, body, headers, retries=retries, redirect=redirect, @@ -706,7 +706,7 @@ class HTTPConnectionPool(ConnectionPool, RequestMethods): raise return response retries.sleep() - log.info("Forced retry: %s", url) + log.debug("Forced retry: %s", url) return self.urlopen( method, url, body, headers, retries=retries, redirect=redirect, @@ -803,8 +803,8 @@ class HTTPSConnectionPool(HTTPConnectionPool): Return a fresh :class:`httplib.HTTPSConnection`. """ self.num_connections += 1 - log.info("Starting new HTTPS connection (%d): %s", - self.num_connections, self.host) + log.debug("Starting new HTTPS connection (%d): %s", + self.num_connections, self.host) if not self.ConnectionCls or self.ConnectionCls is DummyConnection: raise SSLError("Can't connect to HTTPS URL because the SSL " |