Make your own custom color formatter with Python logging
https://alexandra-zaharia.github.io/posts/make-your-own-custom-color-formatter-with-python-logging/
Let us suppose you need to log both to standard output and to a file. Furthermore, you want your console output to be colored. If your intention is to avoid bringing new dependencies to your project (otherwise you’d use loguru, or at the very least colorama), you can do this with a bare-bones custom logging.Formatter class and with ANSI escape code...
Let us suppose you need to log both to standard output and to a file. Furthermore, you want your console output to be colored. If your intention is to avoid bringing new dependencies to your project (otherwise you’d use loguru, or at the very least colorama), you can do this with a bare-bones custom logging.Formatter class and with ANSI escape code...
DA: 3 PA: 22 MOZ Rank: 58