Reduce log chatter in tests (only debug kafka.conn in test_conn)
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import logging
|
||||
import socket
|
||||
import struct
|
||||
from threading import Thread
|
||||
@@ -10,6 +11,10 @@ from kafka.conn import KafkaConnection, collect_hosts, DEFAULT_SOCKET_TIMEOUT_SE
|
||||
|
||||
class ConnTest(unittest.TestCase):
|
||||
def setUp(self):
|
||||
|
||||
# kafka.conn debug logging is verbose, so only enable in conn tests
|
||||
logging.getLogger('kafka.conn').setLevel(logging.DEBUG)
|
||||
|
||||
self.config = {
|
||||
'host': 'localhost',
|
||||
'port': 9090,
|
||||
|
@@ -113,3 +113,8 @@ class Timer(object):
|
||||
self.interval = self.end - self.start
|
||||
|
||||
logging.basicConfig(level=logging.DEBUG)
|
||||
logging.getLogger('test.fixtures').setLevel(logging.ERROR)
|
||||
logging.getLogger('test.service').setLevel(logging.ERROR)
|
||||
|
||||
# kafka.conn debug logging is verbose, disable in tests by default
|
||||
logging.getLogger('kafka.conn').setLevel(logging.INFO)
|
||||
|
Reference in New Issue
Block a user