-
-
Notifications
You must be signed in to change notification settings - Fork 70
Fix logging output routing and added colorized logging (#205, #206) #210
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
Conversation
|
About the basicConfig thing, I tried keeping it at first but it messed with the new handlers, so I just replaced it entirely. Used a dictionary for the colors since it was easier than a bunch of if statements. Did both issues together since #206 needed #205 done first anyway. Thanks @TimidRobot for the clear issue descriptions, made it much easier to understand what was needed! |
TimidRobot
left a comment
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.
Great work!
A couple of the comments are asking you to fix my own mistakes 🙃
Testing this was made a little more difficult due to the branch/PR being out of date (not synchronized with main). I suspect this is also why the changes to the update_readme function were included.
Which tests did you add or update?
What documentation did you update? |
I apologize, I missed the "(if applicable)" part and checked those boxes without thinking. I'm still learning the open source contribution process and will be more careful with the checklist. Thanks for your valuable guidance. |
Updated WARNING and ERROR codes to use the correct foreground colors. Added Wikipedia reference comment above COLORS.
|
Hey, @TimidRobot Fixed all the issues you mentioned: i myself Tested locally and confirmed the colors display correctly. |
TimidRobot
left a comment
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.
This will be helpful, thank you!
Fixes
Description
Fixed logging output routing so info/warning messages go to stdout and errors go to stderr. Also added colors to log messages so they're easier to read in the terminal.
Technical details
Replaced basicConfig() with dual handlers for proper output routing, then added a ColoredFormatter class with the ANSI color codes.
Tests
Run
python scripts/1-fetch/gcs_fetch.py --helpand you'll see colored log output routed correctly.Screenshots
Checklist
Update index.md).mainormaster).visible errors.
Developer Certificate of Origin
For the purposes of this DCO, "license" is equivalent to "license or public domain dedication," and "open source license" is equivalent to "open content license or public domain dedication."
Developer Certificate of Origin