Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

logs: Add colored output #122

Merged
merged 1 commit into from
Oct 30, 2024
Merged

logs: Add colored output #122

merged 1 commit into from
Oct 30, 2024

Conversation

Deedone
Copy link
Contributor

@Deedone Deedone commented Oct 29, 2024

Make the log output colored depending on the log level. This will make it much easier to quickly spot errors and warnings in the output, and also looks cooler.

Control characters for colors are only added if the output is a TTY, so the output can be redirected to a file without any issues.

Here are some examples:
image
image

Copy link
Collaborator

@lorc lorc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great!

Reviewed-by: Volodymyr Babchuk <[email protected]>

Make the log output colored depending on the log level. This will make
it much easier to quickly spot errors and warnings in the output, and
also looks cooler.

Control characters for colors are only added if the output is a TTY, so
the output can be redirected to a file without any issues.

Signed-off-by: Mykyta Poturai <[email protected]>
Reviewed-by: Volodymyr Babchuk <[email protected]>
@lorc lorc merged commit 29af5da into xen-troops:main Oct 30, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants