Skip to main content

Simple log formatters for colored output

Project description

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

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-1.1.0.tar.gz (2.1 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

log_color-1.1.0-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for log_color-1.1.0.tar.gz
Algorithm Hash digest
SHA256 3e58e7e01db51c852ec3c6e90e20d95ad3a6204fd0b7921078d2aa434ebb25ff
MD5 6e1262257a4f09d142d0e3d50a01f535
BLAKE2b-256 355d3ea63bc2261cccc0f7dd15fc612517d9865b571d448469fcae6b400caace

See more details on using hashes here.

File details

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

File metadata

  • Download URL: log_color-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.7

File hashes

Hashes for log_color-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 afd22c4f6c9d86f686eada36b2365896340d13fd034ed8c12fef93ae65b8e946
MD5 e27ee21e83fe05b0fe2cc4b4f54a53af
BLAKE2b-256 1866ff535a03bedc4e012954bb338e5753ff505c95fc834257aa0c65e5e25058

See more details on using hashes here.

Supported by

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