Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Make warnings more visible #12204
Make warnings more visible #12204
Conversation
|
I like it. I am just wondering if those color-control-characters will not show up in the logs in Airflow? I remember we had some problem with that when we introduced colors to log in general. |
|
@potiuk suggested that it would be good to consult the colours with colour-blind users. In general I agree with that, however, the colour will depend on terminal settings so I'm not sure how much we can do around that. |
By default they are streamed to stderr and it look like it works as expected:
The problem with control character was that we piped the logs from tty-like source to file (webserver) and that befuddled the colourful logging mechanism . |
|
The PR needs to run all tests because it modifies core of Airflow! Please rebase it to latest master or ask committer to re-run it! |
This PR proposes to use custom showwarning function that provides users with better information about warnings using rich library to highlight the warning.
c4acd3b
to
c1c599e
This PR proposes to use custom showwarning function that provides users with better information about warnings using rich library to highlight the warning.
This PR proposes using custom
showwarningfunction that provides users with better information about warnings using rich library to highlight the warning.I think this makes harder to miss a warning especially the deprecation ones. I decided to use
richas it may be used in future for enhancing other outputs (see #11259 (comment)).Before
After
^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code change, Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in UPDATING.md.