darenr / logcolor

Formatter allowing for colored output in log messages

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

LogColor

When making command line interfaces, it's often useful to colorize the output to emphasize salient pieces of information or otherwise enhance the user experience. Unfortunately it's quite cumbersome to add colorized outputs to Python log messages.

ColorFormatter

The ColorFormatter is a logging formatter that parses your log messages and adds color codes to the log messages.

example

ColorStripper

The ColorStripper formatter is the inverse of the ColorFormatter. It strips the color information from your messages so that you can safely log to a file.

Installation

I'm on pypi!

$ pip install log_color

Features

  • Simple to use
  • No external dependencies
  • Compatibility with Python 3.6+, PyPy

LogColor honors the NO_COLOR environment variable.

About

Formatter allowing for colored output in log messages

License:Other


Languages

Language:Python 86.9%Language:Makefile 13.1%