Skip to main content

A simple utility package for Python logging with colors

Project description

K-Scale Open Source Robotics

License Version Discord Wiki
python black ruff

colorlogging

Makes logging colorful!

Example of colorlogging output

Example of colorlogging output

Installation

Simply run

pip install colorlogging

Usage

To configure logging, call configure_logging like so:

import colorlogging
import logging

logger = logging.getLogger(__name__)

def main() -> None:
    colorlogging.configure()
    logger.info("Hello, world!")

This tool also provides some other helpful display functions:

import colorlogging

colorlogging.show_info("This is a status message", important=True)
colorlogging.show_warning("This is a warning message")
colorlogging.show_error("This is an error message")

This shows the following output:

Another example of colorlogging output

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

colorlogging-0.0.2.tar.gz (35.0 kB view details)

Uploaded Source

Built Distribution

colorlogging-0.0.2-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

Details for the file colorlogging-0.0.2.tar.gz.

File metadata

  • Download URL: colorlogging-0.0.2.tar.gz
  • Upload date:
  • Size: 35.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.9

File hashes

Hashes for colorlogging-0.0.2.tar.gz
Algorithm Hash digest
SHA256 f1d47ca553df59706474296187679655781a80c00d53202617625ada3c3cb890
MD5 688431572c744e279c96233d8ada0cd8
BLAKE2b-256 a149b11ed1d66a453a9d948a23e8e91a36c3595007e9a2cf3b259704052f23c1

See more details on using hashes here.

File details

Details for the file colorlogging-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for colorlogging-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ae9a3ce3ceca60372569f6acbad7cfd097f812d40596b655c26a74283f9f9faf
MD5 893528449904777683128187a7a646f7
BLAKE2b-256 8788ea3a8378de7a78703d5f10bd04a4f83b193e5026a60d29bacec6c899e188

See more details on using hashes here.

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