[FIX] core: log import traceback in debug mode
This is a followup of 1d553eea7b.
Systematically logging import tracebacks can fill up log files, and
waste disk space. We therefore log those tracebacks in DEBUG mode, so
that they can be activated only when needed.
closes odoo/odoo#45075
X-original-commit: 017e3d798c55b1bdac221aea76d3d944f045ee65
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
This commit is contained in:
+1
-1
@@ -983,7 +983,7 @@ class BaseModel(MetaModel('DummyModel', (object,), {'_register': False})):
|
||||
# Failed to write, log to messages, rollback savepoint (to
|
||||
# avoid broken transaction) and keep going
|
||||
except Exception as e:
|
||||
_logger.exception("Error while loading record")
|
||||
_logger.debug("Error while loading record", exc_info=True)
|
||||
info = rec_data['info']
|
||||
message = (_(u'Unknown error during import:') + u' %s: %s' % (type(e), e))
|
||||
moreinfo = _('Resolve other errors first')
|
||||
|
||||
Reference in New Issue
Block a user