Problem
It can be difficult to identify anomalies in a a stream of text.
Description
Colorize messages based on log level.
| Log level |
Color name |
Color code |
logging.DEBUG |
Bright Black |
90 |
logging.INFO |
White |
37 |
logging.WARNING |
Bright Yellow |
93 |
logging.ERROR |
Bright Red |
91 |
logging.CRITICAL |
Red |
31 |
Note: This intentionally differs from ccos-scripts:
https://github.com/creativecommons/ccos-scripts/blob/1809eb6ab8f8ed4ce51b7f0ce5ae581f0a3556a3/ccos/log.py#L15-L23
Environment
Additional context
Implementation
Problem
It can be difficult to identify anomalies in a a stream of text.
Description
Colorize messages based on log level.
logging.DEBUGlogging.INFOlogging.WARNINGlogging.ERRORlogging.CRITICALNote: This intentionally differs from ccos-scripts:
https://github.com/creativecommons/ccos-scripts/blob/1809eb6ab8f8ed4ce51b7f0ce5ae581f0a3556a3/ccos/log.py#L15-L23
Environment
quantifying/Pipfile
Line 34 in b023018
Additional context
scripts/shared.pyImplementation