From 6316e15fa909e8a7947dc1b31c792bb6ba379271 Mon Sep 17 00:00:00 2001 From: eliott <eliott.sammier@tetras-libre.fr> Date: Thu, 4 Jul 2024 17:28:23 +0200 Subject: [PATCH] Replace print flooding with cleaner log.debug --- tetras_extraction/macao_12/script/src/export.py | 2 +- tetras_extraction/macao_12/script/src/export_corese.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tetras_extraction/macao_12/script/src/export.py b/tetras_extraction/macao_12/script/src/export.py index e12d0f3..326ed4f 100644 --- a/tetras_extraction/macao_12/script/src/export.py +++ b/tetras_extraction/macao_12/script/src/export.py @@ -16,7 +16,7 @@ def create_file(root: Path, path: Path, body: str): # Create parent dir if needed path.parent.mkdir(parents=True, exist_ok=True) # Create and write file - print(f"{path} ->\n{body}") + log.debug(f"File {path} ->\n{body}") with open(path, "w") as f: f.write(body) diff --git a/tetras_extraction/macao_12/script/src/export_corese.py b/tetras_extraction/macao_12/script/src/export_corese.py index 45b3758..b5302ba 100644 --- a/tetras_extraction/macao_12/script/src/export_corese.py +++ b/tetras_extraction/macao_12/script/src/export_corese.py @@ -49,5 +49,5 @@ def apply_templates() -> str: # ==> Run STTL transformation tr = Transformer.create(graph, MODULE_DIR + "/../templates/") result = tr.transform() - print(result) + log.debug("Raw STTL output follows: \n" + result) return result -- GitLab