From ff9da0e9e20a1c4ba682af40fecd23bac121b5d1 Mon Sep 17 00:00:00 2001 From: "Achraf (abz)" Date: Thu, 25 May 2023 06:51:54 +0000 Subject: [PATCH] [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) Signed-off-by: Xavier Morel (xmo) --- odoo/modules/registry.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/odoo/modules/registry.py b/odoo/modules/registry.py index f56504ce93b..77f8b1b23b6 100644 --- a/odoo/modules/registry.py +++ b/odoo/modules/registry.py @@ -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