Only do tracer logging if there are handlers

Fixes #391, thanks cp2587 for the report!
This commit is contained in:
Honza Král
2016-04-09 18:12:33 +02:00
parent 6e94bf76ad
commit cc14efd5df
+1 -1
View File
@@ -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: