[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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user