From 27c4530764d044798fb53e9905c4cdb26491f8ee Mon Sep 17 00:00:00 2001 From: larsevj Date: Mon, 16 Sep 2024 16:54:19 +0200 Subject: [PATCH] Improve logging of errors in callback --- src/ert/callbacks.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ert/callbacks.py b/src/ert/callbacks.py index 1128b0c2232..32b9f639c6d 100644 --- a/src/ert/callbacks.py +++ b/src/ert/callbacks.py @@ -71,6 +71,7 @@ async def _write_responses_to_storage( ) except ValueError as err: errors.append(str(err)) + logger.warning(f"Failed to write: {run_arg.iens}", exc_info=err) if errors: return LoadResult(LoadStatus.LOAD_FAILURE, "\n".join(errors)) return LoadResult(LoadStatus.LOAD_SUCCESSFUL, "") @@ -97,7 +98,7 @@ async def forward_model_ok( ) except Exception as err: - logging.exception(f"Failed to load results for realization {run_arg.iens}") + logger.exception(f"Failed to load results for realization {run_arg.iens}") parameters_result = LoadResult( LoadStatus.LOAD_FAILURE, "Failed to load results for realization "