-
Notifications
You must be signed in to change notification settings - Fork 321
Closed
Labels
Description
While working on #815 and #817, I remembered a suggestion for this. I think it would make them more obvious.
pip does this, with a custom logging.StreamHandler
.
There are also a couple packages that hook into logging
and use colorama
(which Twine already uses for the red errors):
- https://github.com/borntyping/python-colorlog
- https://github.com/xolox/python-coloredlogs
I think part of implementing this should be normalizing the way Twine reports warnings; it currently uses logger.warning
and warnings.warn
. It seems like the former is preferable for this purpose, although logging.captureWarnings
could be a fallback.
Similarly, we might want to rework the red error implementation from #649 to use logger.error
.