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 details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

Details for the file log_color-2.0.0.tar.gz.

File metadata

  • Download URL: log_color-2.0.0.tar.gz
  • Upload date:
  • Size: 2.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.14

File hashes

Hashes for log_color-2.0.0.tar.gz
Algorithm Hash digest
SHA256 d25e30dc1ddfe98c7779ce51090a341b992475de659f2fba80b497338d5b3760
MD5 6e400b701f1b0aee412688fafb972f5e
BLAKE2b-256 f8220f5343585ae3beb7142dc39db03dae61ca50628886396ff1122c752d69ec

See more details on using hashes here.

File details

Details for the file log_color-2.0.0-py3-none-any.whl.

File metadata

  • Download URL: log_color-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 6.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.14

File hashes

Hashes for log_color-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c8363721ddb55ddb0acee43fb2671bb91cb5d3a79a17c9bcc851194f1ecf7a81
MD5 af3b8b01568206fcaad8b4753b5f333a
BLAKE2b-256 fdce89f09e29778fb98f9c5a981de5d9a98f62c837f04a5be040a0274e488849

See more details on using hashes here.

Supported by

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