Merge "Only add logging handlers if there currently aren't any"

This commit is contained in:
Jenkins
2013-05-22 18:45:37 +00:00
committed by Gerrit Code Review

View File

@@ -113,7 +113,7 @@ class HTTPClient(object):
# logging setup
self.debug_log = debug
if self.debug_log:
if self.debug_log and not _logger.handlers:
ch = logging.StreamHandler()
_logger.setLevel(logging.DEBUG)
_logger.addHandler(ch)