From 2bf17b88bca366f9ced851a6152e034f8e94f7ac Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Wed, 15 Nov 2023 16:36:29 +0300 Subject: Log out DB errors even when handled Log out any DB errors that occur to help with tracking and debugging failures. --- qc_app/db_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'qc_app') diff --git a/qc_app/db_utils.py b/qc_app/db_utils.py index 7eca93a..a04c5e1 100644 --- a/qc_app/db_utils.py +++ b/qc_app/db_utils.py @@ -28,7 +28,7 @@ def database_connection(db_url: Optional[str] = None) -> Iterator[mdb.Connection yield connection connection.commit() except mdb.Error as _mdb_err: - logging.debug(traceback.format_exc()) + logging.error(traceback.format_exc()) connection.rollback() finally: connection.close() -- cgit v1.2.3