From 05ac6dd7582322dd7da9c0b013d0433a1bef31d9 Mon Sep 17 00:00:00 2001 From: Arseniy Obolenskiy Date: Sun, 20 Jul 2025 02:35:47 +0200 Subject: [PATCH] Use logging in scoreboard --- scoreboard/main.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scoreboard/main.py b/scoreboard/main.py index 8dfa1d0de..ef604b1f5 100644 --- a/scoreboard/main.py +++ b/scoreboard/main.py @@ -4,6 +4,10 @@ import yaml import csv from jinja2 import Environment, FileSystemLoader +import logging + +logging.basicConfig(level=logging.INFO, format="%(levelname)s: %(message)s") +logger = logging.getLogger(__name__) task_types = ["all", "mpi", "omp", "seq", "stl", "tbb"] @@ -56,7 +60,7 @@ "mpi": "N/A", } else: - print(f"Warning: Performance stats CSV not found at {perf_stat_file_path}") + logger.warning("Performance stats CSV not found at %s", perf_stat_file_path) rows = [] for dir in sorted(directories.keys()): @@ -109,4 +113,4 @@ with open(output_file, "w") as file: file.write(html_content) -print(f"HTML page generated at {output_file}") +logger.info("HTML page generated at %s", output_file)