From 2a5e9bffe6cdc5affea60d23a9efb6992b2fa808 Mon Sep 17 00:00:00 2001 From: Guillaume Vernieres Date: Thu, 19 Sep 2024 07:25:37 -0500 Subject: [PATCH] fixed logging --- ush/python/pygfs/task/marine_analysis.py | 2 +- ush/python/pygfs/utils/marine_da_utils.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ush/python/pygfs/task/marine_analysis.py b/ush/python/pygfs/task/marine_analysis.py index cb5b7628b5..26be0ecc3d 100644 --- a/ush/python/pygfs/task/marine_analysis.py +++ b/ush/python/pygfs/task/marine_analysis.py @@ -487,4 +487,4 @@ def create_obs_space(data): if result.returncode != 0: logger.warning(f"{command} has failed") if result.stderr: - print("STDERR:", result.stderr.decode()) + logger.warning("STDERR:", result.stderr.decode()) diff --git a/ush/python/pygfs/utils/marine_da_utils.py b/ush/python/pygfs/utils/marine_da_utils.py index 8981697eb1..4c746049a8 100644 --- a/ush/python/pygfs/utils/marine_da_utils.py +++ b/ush/python/pygfs/utils/marine_da_utils.py @@ -26,9 +26,9 @@ def run(exec_cmd: Executable) -> None: logger.debug(f"Executing {exec_cmd}") exec_cmd() except OSError: - raise OSError(f"Failed to execute {exec_cmd}") + raise OSError(f"FATAL ERROR: Failed to execute {exec_cmd}") except Exception: - raise WorkflowException(f"An error occured during execution of {exec_cmd}") + raise WorkflowException(f"FATAL ERROR: Error occurred during execution of {exec_cmd}") @logit(logger)