Skip to content

Commit 05ac6dd

Browse files
committed
Use logging in scoreboard
1 parent 4240da3 commit 05ac6dd

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

scoreboard/main.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44
import yaml
55
import csv
66
from jinja2 import Environment, FileSystemLoader
7+
import logging
8+
9+
logging.basicConfig(level=logging.INFO, format="%(levelname)s: %(message)s")
10+
logger = logging.getLogger(__name__)
711

812
task_types = ["all", "mpi", "omp", "seq", "stl", "tbb"]
913

@@ -56,7 +60,7 @@
5660
"mpi": "N/A",
5761
}
5862
else:
59-
print(f"Warning: Performance stats CSV not found at {perf_stat_file_path}")
63+
logger.warning("Performance stats CSV not found at %s", perf_stat_file_path)
6064

6165
rows = []
6266
for dir in sorted(directories.keys()):
@@ -109,4 +113,4 @@
109113
with open(output_file, "w") as file:
110114
file.write(html_content)
111115

112-
print(f"HTML page generated at {output_file}")
116+
logger.info("HTML page generated at %s", output_file)

0 commit comments

Comments
 (0)