Skip to content

Commit 63a5666

Browse files
authored
[scoreboard] Switch from prints to logging (#541)
1 parent bd1f290 commit 63a5666

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
@@ -6,6 +6,10 @@
66
import yaml
77
import csv
88
from jinja2 import Environment, FileSystemLoader
9+
import logging
10+
11+
logging.basicConfig(level=logging.INFO, format="%(levelname)s: %(message)s")
12+
logger = logging.getLogger(__name__)
913

1014
task_types = ["all", "mpi", "omp", "seq", "stl", "tbb"]
1115

@@ -60,7 +64,7 @@
6064
"mpi": "N/A",
6165
}
6266
else:
63-
print(f"Warning: Performance stats CSV not found at {perf_stat_file_path}")
67+
logger.warning("Performance stats CSV not found at %s", perf_stat_file_path)
6468

6569
rows = []
6670
for dir in sorted(directories.keys()):
@@ -147,4 +151,4 @@
147151
with open(output_file, "w") as file:
148152
file.write(html_content)
149153

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

0 commit comments

Comments
 (0)