Stop spilling tracebacks during normal operation
Yes, they are innocent; yes, we log them with DEBUG level. But they scare people, they make people judge the software, they are bad PR, and they are probably redundant, string representation of the exception should be enough. If there is an issue that will result in retry attempts used without remedy, only then we should spill tracebacks and scare users. Guidelines: https://specs.openstack.org/openstack/openstack-specs/specs/log-guidelines.html#stacktraces-in-logs Partial-Bug: #1673249 Change-Id: I791a52161635da64b1840c01ee6cf56a51bc7400
This commit is contained in:
parent
a457949bf7
commit
4f7fc8435f
|
@ -32,7 +32,6 @@ import sqlalchemy
|
|||
from sqlalchemy import event # noqa
|
||||
from sqlalchemy import exc as sql_exc
|
||||
from sqlalchemy.orm import exc
|
||||
import traceback
|
||||
|
||||
from neutron._i18n import _LE
|
||||
from neutron.objects import exceptions as obj_exc
|
||||
|
@ -125,8 +124,7 @@ def retry_db_errors(f):
|
|||
except Exception as e:
|
||||
with excutils.save_and_reraise_exception():
|
||||
if is_retriable(e):
|
||||
LOG.debug("Retry wrapper got retriable exception: %s",
|
||||
traceback.format_exc())
|
||||
LOG.debug("Retry wrapper got retriable exception: %s", e)
|
||||
return wrapped
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue