-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Logger: Add color support for different log levels #4931
Conversation
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.
LGTM. I'll await some reviews from everyone else to see if the colors should be changed before merging.
I don't think it's a good idea to have this as enabled by default. I can see the color messing up with some existing log parsing system or something like that. |
Yeah you are right. This could break some automation system that does not support ANSI escape codes. It's better to leave it off by default and it would be great to point it on the wiki that this could be turned on (probably because most people would like to leave this setting on) if you want. |
I forgot to say thanks for your contribution :) |
Looks like this:
As I said in the code, this is useful when debugging things in Invidious. Having to find the type of error just by the name of the log level is not comfortable in my opinion.
Feel free to edit anything.