diff options
author | Stefan Klug <stefan.klug@ideasonboard.com> | 2024-06-06 11:58:33 +0200 |
---|---|---|
committer | Stefan Klug <stefan.klug@ideasonboard.com> | 2024-07-05 22:38:00 +0200 |
commit | aa02706a34474eb108cf99f94396341e2709f045 (patch) | |
tree | f1066097a7dc0c4739882ee91e2f1cbb893d7aec /utils/tuning/libtuning/generators/yaml_output.py | |
parent | b1f3b3f08d365dc087508b573dd095808267e640 (diff) |
libtuning: Migrate prints to python logging framework
In ctt_ccm.py the logging functionality of the Cam object was used. As
we don't want to port over that class, it needs to be replaced anyways.
While at it, also replace the eprint function as it doesn't add any
value over the logging framework and misses the ability for easy log
formatting.
For nice output formatting add the coloredlogs library.
Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com>
Diffstat (limited to 'utils/tuning/libtuning/generators/yaml_output.py')
-rw-r--r-- | utils/tuning/libtuning/generators/yaml_output.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/utils/tuning/libtuning/generators/yaml_output.py b/utils/tuning/libtuning/generators/yaml_output.py index 8f22d386..31e265df 100644 --- a/utils/tuning/libtuning/generators/yaml_output.py +++ b/utils/tuning/libtuning/generators/yaml_output.py @@ -9,8 +9,9 @@ from .generator import Generator from numbers import Number from pathlib import Path -import libtuning.utils as utils +import logging +logger = logging.getLogger(__name__) class YamlOutput(Generator): def __init__(self): @@ -112,7 +113,7 @@ class YamlOutput(Generator): continue if not isinstance(output_dict[module], dict): - utils.eprint(f'Error: Output of {module.type} is not a dictionary') + logger.error(f'Error: Output of {module.type} is not a dictionary') continue lines = self._stringify_dict(output_dict[module]) |