Add colored logging to tools CLI - #649
Merged
Merged
Conversation
olivierh-pro
reviewed
Aug 3, 2026
olivierh-pro
left a comment
Contributor
There was a problem hiding this comment.
Based on previous thread, would you plan to add this code snippet globally?
Maybe we should have a module lib/logger.py or something like that?
glehmann
force-pushed
the
gln/tools-colored-logging-vtzs
branch
from
August 3, 2026 14:35
adfe9d7 to
3a92673
Compare
Extract the ColoredFormatter and setup_colored_logging helpers added to the tools package into a dedicated lib/logger.py module, so they can be reused outside of lib/tools. lib/tools/__init__.py now imports setup_colored_logging from lib.logger. Signed-off-by: Gaëtan Lehmann <gaetan.lehmann@vates.tech>
glehmann
force-pushed
the
gln/tools-colored-logging-vtzs
branch
from
August 3, 2026 14:41
3a92673 to
383e477
Compare
Member
Author
done |
gduperrey
approved these changes
Aug 3, 2026
olivierh-pro
approved these changes
Aug 3, 2026
olivierh-pro
left a comment
Contributor
There was a problem hiding this comment.
I've also tested with the -d (debug option). It works as expected!
Good job!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Apply the colored logger used in the compat kit to the tools package,
so logs emitted by scripts/tools.py are shown with per-level ANSI colors.
Replaces the plain basicConfig logging setup with a ColoredFormatter.
Signed-off-by: Gaëtan Lehmann gaetan.lehmann@vates.tech