Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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.

About

Formatter allowing for colored output in log messages

Resources

License

Packages

No packages published