Only do tracer logging if there are handlers
Fixes #391, thanks cp2587 for the report!
This commit is contained in:
@@ -65,7 +65,7 @@ class Connection(object):
|
||||
logger.debug('> %s', body)
|
||||
logger.debug('< %s', response)
|
||||
|
||||
if tracer.isEnabledFor(logging.INFO):
|
||||
if tracer.isEnabledFor(logging.INFO) and tracer.hasHandlers():
|
||||
# include pretty in trace curls
|
||||
path = path.replace('?', '?pretty&', 1) if '?' in path else path + '?pretty'
|
||||
if self.url_prefix:
|
||||
|
||||
Reference in New Issue
Block a user