-
Notifications
You must be signed in to change notification settings - Fork 2
Added colorful outputs to the log files #40
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
base: main
Are you sure you want to change the base?
Conversation
Hi @james-may-hammond, thanks for the contribution! I will have a closer look in the coming days, currently I'm a little swamped. I hope you understand. |
Hi, wanted to give you an update: I'm close to merging a big MR I've been cooking up. Because it's a major refactor, your MR will probably have merge conflicts. I can resolve them for you if you want since I'm the cause of the conflicts. After #37 is merged, I will have a closer look at your changes. |
My changes are rather simple once you're done with the MR I can implement them again and create a pr. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I allowed myself to rebase your branch and adjust your changes to the new project structure. I noted a small thing, otherwise lgtm!
|
||
self.write_to_log(&line); | ||
let red_line = line.bright_red().to_string(); | ||
self.write_to_log(&red_line); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's probably preferable to leave the log in plain text. Otherwise the log is full of color codes, e.g. �[0m�[91m[ERROR in THREAD 0...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wasn't the issue to add colorful ops to the log files?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right. I didn't think that could become a problem if one tries to process the logs programmatically and it's not very pleasing to the eyes.
So my proposal is to just show colors in the terminal output when --verbose
is set and keep the log file in plain text.
Here are the changes I've made
[* Colored outputs are not supported everywhere, I have tested using the "less -R" command]