Formatter allowing for colored output in log messages
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
docs Bump version to 1.0.6 and update documentation Nov 16, 2018
src/log_color
tests Added unittests for dark colors Nov 16, 2018
.gitignore update .gitignore Nov 2, 2017
Makefile Added dark color options Nov 15, 2018
README.md Bump version - update readme Feb 12, 2018
copying Add licensing info Jan 6, 2017
setup.py Bump version to 1.0.6 and update documentation Nov 16, 2018
tox.ini

README.md

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 Python2.6, Python 2.7, Python 3.x, PyPy

Makefile

This project uses a Makefile for various tasks. Some of the available tasks are listed below.

  • make clean - Clean build artifacts out of your project
  • make test - Run Unit Tests (using nose & tox)
  • make sdist - Build a Python source distribution
  • make wheel - Build a Python wheel
  • make docs - Build the Sphinx documentation
  • make publish - publish any artifacts in dist/* using twine
  • make pep8 - Get a pep8 compliance report about your code
  • make - Equivalent to make test pep8 docs sdist rpm

http://no-color.org/

LogColor honors the NO_COLOR environment variable.