[FIX] base: Add exception info to logger.error

This commit includes the exception
details when logging an error in the registry module.
By importing the sys module and using the exc_info() method,
the commit ensures that the complete exception information is captured
by Sentry.

This modification improves the error reporting functionality
by providing more comprehensive information about the encountered
exceptions. This will aid in debugging and diagnosing issues,
enabling faster resolution of potential problems.

closes odoo/odoo#124318

X-original-commit: 55118b726bcd2532d2a7e67322eccb1ea6b75b7f
Signed-off-by: Achraf Ben Azzouz (abz) <abz@odoo.com>
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
This commit is contained in:
Achraf (abz)
2023-06-09 13:49:43 +02:00
committed by Achraf
parent c57f9efe83
commit ff9da0e9e2
+1 -1
View File
@@ -92,7 +92,7 @@ class Registry(Mapping):
odoo.modules.reset_modules_state(db_name)
raise
except Exception:
_logger.error('Failed to load registry')
_logger.exception('Failed to load registry')
del cls.registries[db_name] # pylint: disable=unsupported-delete-operation
raise