Merge "Only add logging handlers if there currently aren't any"
This commit is contained in:
@@ -113,7 +113,7 @@ class HTTPClient(object):
|
|||||||
|
|
||||||
# logging setup
|
# logging setup
|
||||||
self.debug_log = debug
|
self.debug_log = debug
|
||||||
if self.debug_log:
|
if self.debug_log and not _logger.handlers:
|
||||||
ch = logging.StreamHandler()
|
ch = logging.StreamHandler()
|
||||||
_logger.setLevel(logging.DEBUG)
|
_logger.setLevel(logging.DEBUG)
|
||||||
_logger.addHandler(ch)
|
_logger.addHandler(ch)
|
||||||
|
Reference in New Issue
Block a user