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.3.tar.gz (6.6 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.3-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for tracecolor-0.3.3.tar.gz
Algorithm Hash digest
SHA256 26795aee979ffdeb36af3ca202d712e1efdfa5fa5e469790a1be58f528737079
MD5 86a5e95054a6ba43a5245733bd9abf4c
BLAKE2b-256 1274abb2a4a11cae997e1796a01672755dc2070661d5045f192df2b90434a6de

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tracecolor-0.3.3-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.13.2

File hashes

Hashes for tracecolor-0.3.3-py3-none-any.whl
Algorithm Hash digest
SHA256 e25c768a2e624cf2328c30b4e867b370358066dd80665a8288006b979c1a62f5
MD5 70c50b0336de2a595f2e068c74cf1a25
BLAKE2b-256 ba5651139abd2ce1ef8cd175dee3832f302841ac08b1679c685e27c3cd10171d

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