Make "Connect(ing|ed) to AMQP server" log messages DEBUG level
According to our guidelines, INFO level is for unit-of-work messages valueable for an operator. This rules out "connecting" message. As to "connected", while it might fall under guidelines, it seems to flood logs without too much value, see for example: http://logs.openstack.org/98/219298/9/check/gate-tempest-dsvm-ironic-pxe_ipa/53784fb/logs/screen-ir-api.txt.gz?level=INFO Change-Id: I65e0f19590c42d25e5551d45af37416a01a7d638
This commit is contained in:
parent
8130e833a4
commit
26d9362e5d
oslo_messaging
@ -465,8 +465,8 @@ class Connection(object):
|
||||
},
|
||||
)
|
||||
|
||||
LOG.info(_LI('Connecting to AMQP server on %(hostname)s:%(port)s'),
|
||||
self.connection.info())
|
||||
LOG.debug('Connecting to AMQP server on %(hostname)s:%(port)s',
|
||||
self.connection.info())
|
||||
|
||||
# NOTE(sileht): kombu recommend to run heartbeat_check every
|
||||
# seconds, but we use a lock around the kombu connection
|
||||
@ -491,8 +491,8 @@ class Connection(object):
|
||||
if purpose == rpc_amqp.PURPOSE_SEND:
|
||||
self._heartbeat_start()
|
||||
|
||||
LOG.info(_LI('Connected to AMQP server on %(hostname)s:%(port)s'),
|
||||
self.connection.info())
|
||||
LOG.debug('Connected to AMQP server on %(hostname)s:%(port)s',
|
||||
self.connection.info())
|
||||
|
||||
# NOTE(sileht): value chosen according the best practice from kombu
|
||||
# http://kombu.readthedocs.org/en/latest/reference/kombu.common.html#kombu.common.eventloop
|
||||
|
@ -91,10 +91,12 @@ class TestHeartbeat(test_utils.BaseTestCase):
|
||||
|
||||
if not heartbeat_side_effect:
|
||||
self.assertEqual(1, fake_ensure_connection.call_count)
|
||||
self.assertEqual(2, fake_logger.info.call_count)
|
||||
self.assertEqual(2, fake_logger.debug.call_count)
|
||||
self.assertEqual(0, fake_logger.info.call_count)
|
||||
else:
|
||||
self.assertEqual(2, fake_ensure_connection.call_count)
|
||||
self.assertEqual(3, fake_logger.info.call_count)
|
||||
self.assertEqual(2, fake_logger.debug.call_count)
|
||||
self.assertEqual(1, fake_logger.info.call_count)
|
||||
self.assertIn(mock.call(info, mock.ANY),
|
||||
fake_logger.info.mock_calls)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user