skillfed

colorlog

Add colours to the output of Python's logging module.

colorlog Permissive license MIT License Active 967 v6.12.0 released

Install

colorlog on PyPI

pip

pip install colorlog

uv

uv add colorlog

poetry

poetry add colorlog

Package facts

License MIT License (permissive)
Python support supports the current Python release (>=3.6)
Install friction low — pure-Python wheel
Runtime dependencies 1 — colorama
Maintenance actively maintained — 21 days since the last release
Last repo commit
First released
Popularity one of the top 1,000 most-downloaded packages on PyPI (30-day window, as of 2026-08-13)
Known vulnerabilities none known (OSV.dev, checked 2026-08-13)

Evidence: colorlog-6.12.0-py3-none-any.whl

Development Status :: 5 - Production/StableEnvironment :: ConsoleIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: TerminalsTopic :: Utilities

About colorlog

from the package's own PyPI description — quoted content, verbatim

Log formatting with colors!

https://img.shields.io/pypi/v/colorlog.svg (image) https://img.shields.io/pypi/l/colorlog.svg (image)

Add colours to the output of Python's logging module.

Status

colorlog currently requires Python 3.6 or higher. Older versions (below 5.x.x) support Python 2.6 and above.

  • colorlog 6.x requires Python 3.6 or higher.
  • colorlog 5.x is an interim version that will warn Python 2 users to downgrade.
  • colorlog 4.x is the final version supporting Python 2.

[colorama] is included as a dependency on Windows, where it is automatically initialised to support colored output.

This library is over a decade old and supported a wide set of Python versions for most of its life, which has made it a difficult library to add new features to. colorlog 6 may break backwards compatibility so that newer features can be added more easily, but may still not accept all changes or feature requests. colorlog 4 might accept essential bugfixes but should not be considered...

Read as markdown · JSON record · Source repository · Homepage

AI interpretation — verify before relying

AI-generated interpretation of the package facts above; every digit, version, license, or vulnerability id it cites is grounded in the facts already shown on this page

Adds colored output to Python's logging module, letting you format log messages with ANSI color codes that adapt to terminal capabilities and respect NO_COLOR environment settings.

Installs cleanly with minimal friction—a single pure-Python wheel and one runtime dependency (colorama). Actively maintained with a release 21 days ago; the codebase is over a decade old but explicitly in maintenance mode, prioritizing stability over new features.

MIT License (permissive) places no restrictions on use, modification, or distribution in proprietary or open-source projects.

Usage

import colorlog

handler = colorlog.StreamHandler()
handler.setFormatter(colorlog.ColoredFormatter())
logger = colorlog.getLogger('example')
logger.addHandler(handler)
logger.info('Colored message')

Requires Python 3.6 or higher; colorlog 6.x does not support Python 2.

Verdict: A stable, low-friction choice for adding colors to Python logging. No known vulnerabilities, permissive license, and active maintenance make it safe for production use. The library explicitly trades new features for backwards compatibility, so it is best suited for projects that need reliable colored logging rather than cutting-edge functionality.

Needs verification

  • Whether colorama is conditionally installed only on Windows or included unconditionally (description says 'on Windows' but fact sheet lists it as unconditional runtime dependency).
  • Performance impact of color formatting on high-volume logging workloads.
colored logging outputansi color log formatterpython logging colorsterminal log colorizationcolored console logginglog formatting with colors

Similar packages