-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Decouple logs output color from the logging level #10763
Decouple logs output color from the logging level #10763
Conversation
ba5da68
to
12ccee9
Compare
Hurrah! Work for #10421 is making these little things easier as well! |
12ccee9
to
3969a38
Compare
Fixed (at least I think I did) a pre-commit issue in the last change. It's my first contribution to |
The linters are going well. The tests are currently failing because of #10742. |
Doing the close-reopen dance, in case GH actions runs on a simulated merge commit. |
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.
@healthy-pod why did you add a "bugfix" change note? This seems to be a feature. Also, is the note text empty by accident?
On a side note: it may be worth splitting the addition of the mechanism that implements attaching colors to messages and using it. I'd imagine that the first part could benefit from some sort of automatic tests.
P.S. I see you're allowing color strings — would allowing to set the whole style too be useful?
Hiya @healthy-pod! Could you rebase1 this PR? This branch was created at a point where the CI on Footnotes
|
3969a38
to
564fd7f
Compare
Done |
I swear our CI is usually not a fickle beast like this. Ok, maybe it is... Anyway, @healthy-pod could you rebase this again? |
564fd7f
to
4f0a222
Compare
Done |
Oh hey, look! The test suite works, and there's tests that caught that you're spewing to stderr instead of stdout now. You'll likely need to fix those! :) |
Hiya @healthy-pod! A gentle nudge on this -- this PR needs a minro update. If you won't have time to address this soon, please let me know and I'll pick it up. :) |
Thanks for the reminder @pradyunsg! I assume "critical" goes to stderr while "info" goes to stdout. I changed |
4f0a222
to
d669bdc
Compare
Previously, each logging level was coupled with a specific output color. This isn't always ideal because we might need to log at a certain level but use a custom color (based on user feedback / see linked issue). This patch decouples the logs output color from the logging level. Fixes pypa#10519
d669bdc
to
f3636d6
Compare
Previously, each logging level was coupled with a specific
output color. This isn't always ideal because we might need
to log at a certain level but use a custom color (based on
user feedback / see linked issue).
This patch decouples the logs output color from the logging
level.
Fixes #10519