Don't put the message payload into warning log

When a caller msg doesn't exists anymore but a reply is ready for it.
amqp driver drop the whole message into a logging.warn. That can be a
bit huge in some case.

This change just writes the message id to the WARN level and put the queues
and the messages into the debug level.

Change-Id: Ibcc6b066171cdea48f102ca1bd85f81c639fbbb5
This commit is contained in:
Mehdi Abaakouk 2014-09-24 17:41:17 +02:00
parent 70910e0c9b
commit f61f7c570f
1 changed files with 4 additions and 4 deletions

View File

@ -26,6 +26,7 @@ from oslo import messaging
from oslo.messaging._drivers import amqp as rpc_amqp
from oslo.messaging._drivers import base
from oslo.messaging._drivers import common as rpc_common
from oslo.messaging._i18n import _LI
LOG = logging.getLogger(__name__)
@ -156,10 +157,9 @@ class ReplyWaiters(object):
def put(self, msg_id, message_data):
queue = self._queues.get(msg_id)
if not queue:
LOG.warn('No calling threads waiting for msg_id : %(msg_id)s'
', message : %(data)s', {'msg_id': msg_id,
'data': message_data})
LOG.warn('_queues: %s', self._queues)
LOG.info(_LI('No calling threads waiting for msg_id : %s'), msg_id)
LOG.debug(' queues: %(queues)s, message: %(message)',
{'queues': self._queues, 'message': message_data})
else:
queue.put(message_data)