From 89ff9d0160aa067ae422714a276861adcef09ca9 Mon Sep 17 00:00:00 2001 From: ahmedk <karim.ahmed@xfel.eu> Date: Mon, 28 Oct 2024 17:15:07 +0100 Subject: [PATCH] uncaught error same raw string --- src/xfel_calibrate/setup_logging.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/xfel_calibrate/setup_logging.py b/src/xfel_calibrate/setup_logging.py index ba7015e59..24d1c7f77 100644 --- a/src/xfel_calibrate/setup_logging.py +++ b/src/xfel_calibrate/setup_logging.py @@ -99,9 +99,7 @@ def safe_handle_error(exc_type, exc_value, exc_traceback): handling_error = True try: # Log the error with the notebook name, job ID, and additional metadata - logger.error( - "An error occurred. Exception type: %s, Message: %s", - exc_type.__name__, str(exc_value), + logger.error(str(exc_value), extra={ 'notebook': NOTEBOOK_NAME, 'job_id': JOB_ID, -- GitLab