diff --git a/oslo_messaging/_drivers/impl_rabbit.py b/oslo_messaging/_drivers/impl_rabbit.py index eaa866882..be41cc0f5 100644 --- a/oslo_messaging/_drivers/impl_rabbit.py +++ b/oslo_messaging/_drivers/impl_rabbit.py @@ -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 diff --git a/oslo_messaging/tests/drivers/test_impl_rabbit.py b/oslo_messaging/tests/drivers/test_impl_rabbit.py index 915715450..06c78982a 100644 --- a/oslo_messaging/tests/drivers/test_impl_rabbit.py +++ b/oslo_messaging/tests/drivers/test_impl_rabbit.py @@ -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)