Skip to main content

Simple log formatters for colored output

Project description

LogColor

Test Lint

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 log to a file without it being full of color codes.

Installation

I'm on pypi!

$ pip install log_color

Features

  • Simple to use
  • No external dependencies
  • Compatibility with Python 3.7+, PyPy
  • Fast! Compiled binaries are available for some systems!

http://no-color.org/

LogColor honors the NO_COLOR environment variable.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

log_color-2.0.0.tar.gz (2.1 MB view hashes)

Uploaded Source

Built Distribution

log_color-2.0.0-py3-none-any.whl (6.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page