From 6d0e043ac6072de7325eacc0956e0cc968425791 Mon Sep 17 00:00:00 2001 From: lb584 <lb584@cam.ac.uk> Date: Tue, 24 Sep 2024 14:31:01 +0100 Subject: [PATCH] adding file-based logging to epi fit (to allow different configuration when running in gitlab-ci) --- ews/coordinator/processor_base.py | 6 +++--- ews/coordinator/utils/processor_utils.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ews/coordinator/processor_base.py b/ews/coordinator/processor_base.py index 1ca3da0..b21782c 100755 --- a/ews/coordinator/processor_base.py +++ b/ews/coordinator/processor_base.py @@ -146,7 +146,7 @@ class ProcessorBase: Generate the job directory path :param config: - :return: + :return:` """ short_name: str = config['short_name'] start_date: str = config['StartString'] @@ -331,7 +331,7 @@ class ProcessorBase: if k not in config.keys(): config[k] = v else: - print(f"Key {k} already present in run config - not adding key with same name from " + print(f"Key '{k}' already present in run config - not adding key with same name from " f"the sys_config") """ @@ -340,7 +340,7 @@ class ProcessorBase: """ for k, v in args.items(): if k in config.keys(): - print(f"Key {k} already present in run config - overriding key with same name from " + print(f"Key '{k}' already present in run config - overriding key with same name from " f"the sys args") config[k] = v diff --git a/ews/coordinator/utils/processor_utils.py b/ews/coordinator/utils/processor_utils.py index 19b3312..3abaaba 100644 --- a/ews/coordinator/utils/processor_utils.py +++ b/ews/coordinator/utils/processor_utils.py @@ -396,7 +396,7 @@ def setup_logging(job_file_path: str, with open(json_file_path, 'r') as f: log_config_dict = json.load(f) - # replace the {arg_string} roken in the logging json with the values passed in the command line. This allows the + # replace the {arg_string} token in the logging json with the values passed in the command line. This allows the # command line arguments to be logged. log_config_dict['formatters']['detailed']['format'] = \ log_config_dict['formatters']['detailed']['format'].replace("{arg_string}", arg_string) -- GitLab