NRLMMD-GEOIPS / geoips

Main Geolocated Information Processing System code base with basic functionality enabled.
https://nrlmmd-geoips.github.io/geoips/
Other
14 stars 11 forks source link

Colorized Logs #490

Open biosafetylvl5 opened 5 months ago

biosafetylvl5 commented 5 months ago

Colorized logs

Description

Requirements

Alternative Solutions

Proposed Solution

Use rich. Rich supports various text formatting options, such as italicizing, folding, and underlining, alongside colorization, and offers a toolset for logging with colors/formatting.Rich is small (~2.3 MB), popular (approx. 50k stars, ~2k forks), active (updates in the last few months).

Rich has a colorized/formatted log handler: https://rich.readthedocs.io/en/stable/logging.html

Lots of features, eg. "Rich can automatically highlight patterns in text, such as numbers, strings, collections, booleans, None, and a few more exotic patterns such as file paths, URLs and UUIDs."

And also can do this:

log.error("[bold red blink]Server is shutting down![/]", extra={"markup": True})

All of which can be turned off. There's lots more too - see the docs here: https://rich.readthedocs.io/

Roadmap for Completion