I’m an astronomer/engineer who writes a lot of code to simulate exoplanet missions.
Colorful Python Logging
Goal Create a logger for a python library that results in terminal output like this: The library yippy has its own color, the logger has different colors for INFO, WARNING, ERROR, etc statements, and the logger’s level can be set by the user on a per-library basis. To do this we will use ANSI escape codes and a custom logger built with the standard Python logging library. ANSI escape codes An ANSI escape code is a sequence of characters used to control the formatting, color, and other output options on text terminals that support ANSI standards....