Skip to main content

A lightweight, colorized Python logger with TRACE and SLOW_TRACE level support.

Project description

TraceColor

A lightweight, colorized Python logger with TRACE and SLOW_TRACE level support.

Features

  • Custom TRACE logging level (lower than DEBUG)
  • Custom SLOW_TRACE logging level (between DEBUG and INFO)
  • Colorized output for different log levels
  • Rate-limiting for SLOW_TRACE messages (once per second)
  • Simple and clean API

Installation

pip install tracecolor

Usage

from tracecolor import MLog

# Create a logger
logger = MLog(__name__)

# Log at different levels
logger.trace("Detailed tracing information")
logger.slow_trace("Frequent tracing information (rate-limited)")
logger.debug("Debugging information")
logger.info("General information")
logger.warning("Warning message")
logger.error("Error message")
logger.critical("Critical error")

Color Scheme

  • TRACE: White
  • SLOW_TRACE: White
  • DEBUG: Cyan
  • INFO: Green
  • WARNING: Yellow
  • ERROR: Red
  • CRITICAL: Bold Red

License

MIT

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

tracecolor-0.3.1.tar.gz (6.8 kB view details)

Uploaded Source

Built Distribution

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

tracecolor-0.3.1-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file tracecolor-0.3.1.tar.gz.

File metadata

  • Download URL: tracecolor-0.3.1.tar.gz
  • Upload date:
  • Size: 6.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.4

File hashes

Hashes for tracecolor-0.3.1.tar.gz
Algorithm Hash digest
SHA256 03bc9238ee6c642422735994b4ca0e72aa0208e04f86dee9f5f90bd4ac23a428
MD5 86b84c115ac00c0573c44852aa5dfbb7
BLAKE2b-256 aab147da3a84fcbc43e3989c2d9e586e93f471e8bdbdf24ca39dfe5dc24b5271

See more details on using hashes here.

File details

Details for the file tracecolor-0.3.1-py3-none-any.whl.

File metadata

  • Download URL: tracecolor-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 4.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.4

File hashes

Hashes for tracecolor-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 80ef7349285700ed440c646372c4f7ec615a7a206fd67c893a926ba9d0aa502b
MD5 d371308736ac7d99ebad94af061e6f37
BLAKE2b-256 265b6e8a2d42a130120b77e1f51b92c72142ff0472341c18b49aa1352c80d27e

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