Remove debug logs from fast path
Decrease the size of the debug log output drastically by removing debug messages issued for each message. This patch only removes those log statements that log correct behavior - errant behavior is still logged for debug. Change-Id: I1c67e6ed7e503ef3b9543fdfce31b91c46bd851a
This commit is contained in:
parent
f52e5cfbca
commit
9775ed3cce
@ -429,8 +429,6 @@ class Sender(pyngus.SenderEventHandler):
|
|||||||
# simulate ack to wakeup sender
|
# simulate ack to wakeup sender
|
||||||
send_task._on_ack(pyngus.SenderLink.ACCEPTED, dict())
|
send_task._on_ack(pyngus.SenderLink.ACCEPTED, dict())
|
||||||
|
|
||||||
LOG.debug("Message sent to %s", self._address)
|
|
||||||
|
|
||||||
def _send_pending(self):
|
def _send_pending(self):
|
||||||
# send as many pending messages as there is credit available
|
# send as many pending messages as there is credit available
|
||||||
if self._can_send:
|
if self._can_send:
|
||||||
@ -500,8 +498,6 @@ class Replies(pyngus.ReceiverEventHandler):
|
|||||||
# reply is placed on reply_queue
|
# reply is placed on reply_queue
|
||||||
self._correlation[request.id] = callback
|
self._correlation[request.id] = callback
|
||||||
request.reply_to = self._receiver.source_address
|
request.reply_to = self._receiver.source_address
|
||||||
LOG.debug("Reply for msg id=%(id)s expected on link %(reply_to)s",
|
|
||||||
{'id': request.id, 'reply_to': request.reply_to})
|
|
||||||
return request.id
|
return request.id
|
||||||
|
|
||||||
def cancel_response(self, msg_id):
|
def cancel_response(self, msg_id):
|
||||||
@ -552,7 +548,6 @@ class Replies(pyngus.ReceiverEventHandler):
|
|||||||
arrives on this receiver link from the peer.
|
arrives on this receiver link from the peer.
|
||||||
"""
|
"""
|
||||||
key = message.correlation_id
|
key = message.correlation_id
|
||||||
LOG.debug("Received response for msg id=%s", key)
|
|
||||||
try:
|
try:
|
||||||
self._correlation[key](message)
|
self._correlation[key](message)
|
||||||
# cleanup (only need one response per request)
|
# cleanup (only need one response per request)
|
||||||
@ -660,7 +655,6 @@ class Server(pyngus.ReceiverEventHandler):
|
|||||||
else:
|
else:
|
||||||
LOG.debug("Can't find receiver for settlement")
|
LOG.debug("Can't find receiver for settlement")
|
||||||
|
|
||||||
LOG.debug("Message received on: %s", receiver.target_address)
|
|
||||||
qentry = {"message": message, "disposition": message_disposition}
|
qentry = {"message": message, "disposition": message_disposition}
|
||||||
self._incoming.put(qentry)
|
self._incoming.put(qentry)
|
||||||
|
|
||||||
@ -873,7 +867,6 @@ class Controller(pyngus.ConnectionEventHandler):
|
|||||||
if send_task.deadline and send_task.deadline <= now():
|
if send_task.deadline and send_task.deadline <= now():
|
||||||
send_task._on_timeout()
|
send_task._on_timeout()
|
||||||
return
|
return
|
||||||
LOG.debug("Sending message to %s", send_task.target)
|
|
||||||
if send_task.retry is None or send_task.retry < 0:
|
if send_task.retry is None or send_task.retry < 0:
|
||||||
send_task.retry = None
|
send_task.retry = None
|
||||||
key = keyify(send_task.target, send_task.service)
|
key = keyify(send_task.target, send_task.service)
|
||||||
|
@ -103,8 +103,6 @@ class ProtonIncomingMessage(base.RpcIncomingMessage):
|
|||||||
if self._reply_to:
|
if self._reply_to:
|
||||||
response = marshal_response(reply, failure)
|
response = marshal_response(reply, failure)
|
||||||
response.correlation_id = self._correlation_id
|
response.correlation_id = self._correlation_id
|
||||||
LOG.debug("Sending RPC reply to %s (%s)", self._reply_to,
|
|
||||||
self._correlation_id)
|
|
||||||
driver = self.listener.driver
|
driver = self.listener.driver
|
||||||
deadline = compute_timeout(driver._default_reply_timeout)
|
deadline = compute_timeout(driver._default_reply_timeout)
|
||||||
ack = not driver._pre_settle_reply
|
ack = not driver._pre_settle_reply
|
||||||
@ -117,7 +115,7 @@ class ProtonIncomingMessage(base.RpcIncomingMessage):
|
|||||||
rc = task.wait()
|
rc = task.wait()
|
||||||
if rc:
|
if rc:
|
||||||
# something failed. Not much we can do at this point but log
|
# something failed. Not much we can do at this point but log
|
||||||
LOG.debug("Reply failed to send: %s", str(rc))
|
LOG.debug("RPC Reply failed to send: %s", str(rc))
|
||||||
else:
|
else:
|
||||||
LOG.debug("Ignoring reply as no reply address available")
|
LOG.debug("Ignoring reply as no reply address available")
|
||||||
|
|
||||||
@ -187,7 +185,6 @@ class ProtonListener(base.PollStyleListener):
|
|||||||
message = qentry['message']
|
message = qentry['message']
|
||||||
request, ctxt = unmarshal_request(message)
|
request, ctxt = unmarshal_request(message)
|
||||||
disposition = qentry['disposition']
|
disposition = qentry['disposition']
|
||||||
LOG.debug("poll: message received")
|
|
||||||
return ProtonIncomingMessage(self, ctxt, request, message, disposition)
|
return ProtonIncomingMessage(self, ctxt, request, message, disposition)
|
||||||
|
|
||||||
|
|
||||||
@ -308,7 +305,6 @@ class ProtonDriver(base.BaseDriver):
|
|||||||
# this could lead to a hang - provide a default to prevent this
|
# this could lead to a hang - provide a default to prevent this
|
||||||
# TODO(kgiusti) only do this if brokerless backend
|
# TODO(kgiusti) only do this if brokerless backend
|
||||||
expire = compute_timeout(self._default_send_timeout)
|
expire = compute_timeout(self._default_send_timeout)
|
||||||
LOG.debug("Sending message to %s", target)
|
|
||||||
if wait_for_reply:
|
if wait_for_reply:
|
||||||
ack = not self._pre_settle_call
|
ack = not self._pre_settle_call
|
||||||
task = controller.RPCCallTask(target, request, expire, retry,
|
task = controller.RPCCallTask(target, request, expire, retry,
|
||||||
@ -327,7 +323,6 @@ class ProtonDriver(base.BaseDriver):
|
|||||||
# Must log, and determine best way to communicate this failure
|
# Must log, and determine best way to communicate this failure
|
||||||
# back up to the caller
|
# back up to the caller
|
||||||
reply = unmarshal_response(reply, self._allowed_remote_exmods)
|
reply = unmarshal_response(reply, self._allowed_remote_exmods)
|
||||||
LOG.debug("Send to %s returning", target)
|
|
||||||
return reply
|
return reply
|
||||||
|
|
||||||
@_ensure_connect_called
|
@_ensure_connect_called
|
||||||
@ -354,7 +349,6 @@ class ProtonDriver(base.BaseDriver):
|
|||||||
# queueless this could lead to a hang - provide a default to prevent
|
# queueless this could lead to a hang - provide a default to prevent
|
||||||
# this
|
# this
|
||||||
# TODO(kgiusti) should raise NotImplemented if not broker backend
|
# TODO(kgiusti) should raise NotImplemented if not broker backend
|
||||||
LOG.debug("Send notification to %s", target)
|
|
||||||
deadline = compute_timeout(self._default_notify_timeout)
|
deadline = compute_timeout(self._default_notify_timeout)
|
||||||
ack = not self._pre_settle_notify
|
ack = not self._pre_settle_notify
|
||||||
task = controller.SendTask("Notify", request, target,
|
task = controller.SendTask("Notify", request, target,
|
||||||
@ -364,7 +358,6 @@ class ProtonDriver(base.BaseDriver):
|
|||||||
rc = task.wait()
|
rc = task.wait()
|
||||||
if isinstance(rc, Exception):
|
if isinstance(rc, Exception):
|
||||||
raise rc
|
raise rc
|
||||||
LOG.debug("Send notification to %s returning", target)
|
|
||||||
|
|
||||||
@_ensure_connect_called
|
@_ensure_connect_called
|
||||||
def listen(self, target, batch_size, batch_timeout):
|
def listen(self, target, batch_size, batch_timeout):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user