diff options
author | Davanum Srinivas <davanum@gmail.com> | 2015-03-18 14:19:47 -0400 |
---|---|---|
committer | Mehdi Abaakouk <mehdi.abaakouk@enovance.com> | 2015-03-24 17:34:55 +0100 |
commit | 57fad97977914d95d3da55bac8a7867f5c78901a (patch) | |
tree | 2f10edb7811e42b4873c7b51f1af823535caa1dc | |
parent | b5f91b2167f9c5a32620ebf7c62a9865ed125070 (diff) | |
download | oslo-messaging-57fad97977914d95d3da55bac8a7867f5c78901a.tar.gz |
Publish tracebacks only on debug level
With the new heartbeat code, there may be a lot of tracebacks
we should mute them for normal ops and log them only when
we need (enable debug level).
Change-Id: I4b729ed1a6ddad2a0e48102852b2ce7d66423eaa
(cherry picked from commit 23dfb6ee4d5abb31552490e80c2f57187b00fb34)
-rw-r--r-- | oslo_messaging/_drivers/impl_rabbit.py | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/oslo_messaging/_drivers/impl_rabbit.py b/oslo_messaging/_drivers/impl_rabbit.py index 08e556b..17a140d 100644 --- a/oslo_messaging/_drivers/impl_rabbit.py +++ b/oslo_messaging/_drivers/impl_rabbit.py @@ -953,8 +953,9 @@ class Connection(object): "occurred, trying to reconnect: %s"), exc) self.ensure_connection() except Exception: - LOG.exception(_LE("Unexpected error during heartbeart " - "thread processing, retrying...")) + LOG.warning(_LW("Unexpected error during heartbeart " + "thread processing, retrying...")) + LOG.debug('Exception', exc_info=True) self._heartbeat_exit_event.wait( timeout=self._heartbeat_wait_timeout) @@ -999,8 +1000,8 @@ class Connection(object): def _error_callback(exc): _recoverable_error_callback(exc) - LOG.exception(_('Failed to consume message from queue: %s'), - exc) + LOG.error(_('Failed to consume message from queue: %s'), + exc) def _consume(): if self.do_consume: @@ -1038,8 +1039,9 @@ class Connection(object): @staticmethod def _log_publisher_send_error(topic, exc): log_info = {'topic': topic, 'err_str': exc} - LOG.exception(_("Failed to publish message to topic " - "'%(topic)s': %(err_str)s"), log_info) + LOG.error(_("Failed to publish message to topic " + "'%(topic)s': %(err_str)s"), log_info) + LOG.debug('Exception', exc_info=exc) default_marker = object() |