colorlog
Add colours to the output of Python's logging module.
Install
colorlog on PyPI
pip
pip install colorloguv
uv add colorlogpoetry
poetry add colorlogPackage 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
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.
Similar packages
permissive · top 100 on PyPI
logurupermissive · top 1,000 on PyPI
olefilepermissive · top 1,000 on PyPI
webcolorspermissive · top 1,000 on PyPI
termcolorpermissive · top 1,000 on PyPI
rich-argparsepermissive · top 1,000 on PyPI
coloredlogspermissive · top 1,000 on PyPI
cleopermissive · top 1,000 on PyPI
wcwidthpermissive · top 1,000 on PyPI
humanfriendlypermissive · top 1,000 on PyPI