From 8603e3e32bf3d8641b15c4fb6307f364109b8651 Mon Sep 17 00:00:00 2001 From: lb584 <lb584@cam.ac.uk> Date: Fri, 5 May 2023 13:38:42 +0100 Subject: [PATCH] moving log file output to before the assert statement, so we can more easily see which file is missing [if a file is missing] --- coordinator/Processor.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/coordinator/Processor.py b/coordinator/Processor.py index 0bcc1c8..100b7a8 100755 --- a/coordinator/Processor.py +++ b/coordinator/Processor.py @@ -186,6 +186,8 @@ def move_default_logfile_handler(dstPathName,srcPathName=log_path_default,FileHa contents of the source log file to destination, switches file handler in logger, then removes source log file.''' + logger.info(f"Moving logfile location from:\n{srcPathName}\nto:\n{dstPathName}") + # copy old log file to new filename srcPath = Path(srcPathName) dstPath = Path(dstPathName) @@ -200,7 +202,6 @@ def move_default_logfile_handler(dstPathName,srcPathName=log_path_default,FileHa newfilehandler.setLevel(oldFileHandler.level) newfilehandler.setFormatter(oldFormatter) - logger.info(f"Moving logfile location from:\n{srcPathName}\nto:\n{dstPathName}") shutil.copyfile(srcPath,dstPath) # add handler for destination file -- GitLab