logzero
Robust and effective logging for Python 2 and 3
What it is and what it does
logzero is a thin wrapper around Python's standard logging module that provides sensible defaults for console and file logging with minimal boilerplate. It offers colored console output (with Windows support via colorama), rotating file handlers, JSON formatting, and a global default logger accessible as logzero.logger, plus a setup_logger() function for custom loggers. The package is intentionally lightweight—contained in a single file—and handles encoding edge cases robustly.
The package targets developers who want logging without wrestling with the standard library's configuration complexity. It supports Python 2 and 3, and integrates with python-json-logger for structured logging. However, the repository is archived with the last commit on 2022-11-27, meaning no active maintenance, no bug fixes, and no compatibility updates for modern Python releases.
Use it for:
- Quick logging setup in scripts or small applications where standard logging config feels like overkill
- Adding colored console output to CLI tools and utilities for better readability during development
- Rotating file logging in long-running services to prevent log files from consuming unlimited disk space
- Structured JSON logging for applications that parse logs with external tools or ship to log aggregation services
- Cross-platform applications needing colored output on Windows without manually configuring colorama
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
logzero provides pre-configured Python logging to console and/or rotating files with colored output, JSON formatting support, and minimal setup overhead.
Yes, if you need simple logging and accept the maintenance risk. The package is stable and works well for its narrow use case, but the abandoned status means no fixes for compatibility issues, security updates, or dependency conflicts. Suitable for personal projects, scripts, or applications you control fully; risky for production systems or long-term maintenance obligations. Consider actively maintained alternatives if you need ongoing support.
Install
logzero on PyPI
pip
pip install logzerouv
uv add logzeropoetry
poetry add logzeroInstalling logzero
Before you install
Low install friction with a single runtime dependency (colorama). However, the repository is archived and the last release was in March 2021. No active maintenance; bug fixes or compatibility updates are unlikely.
License in practice
MIT license is permissive; you can use, modify, and distribute logzero freely in commercial and private projects without restriction.
Quickstart
pip install logzero
from logzero import logger
logger.info("hello")
logger.error("error")
import logzero
logzero.logfile("/tmp/logzero-demo.log")
logzero.loglevel(logzero.WARNING)
Verify before relying
- Whether the package remains compatible with Python versions released after 3.9
- Whether colorama's Windows color support continues to work on modern Windows versions
- Whether JSON logging output format is stable or has known issues with modern json-logger versions
Package facts
| License | MIT license (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — colorama |
| Maintenance | abandoned — 1,976 days since the last release |
| Last repo commit | (repository archived) |
| First released | |
| Downloads | 997,404/month — #4,545 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: logzero-1.7.0-py2.py3-none-any.whl
Keywords: logzero
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
jsonformatterFormats Python logging output as JSON, enabling…
permissive · top 15,000 on PyPI
logstash_formatterFormats Python logging output as JSON objects…
permissive · top 15,000 on PyPI
python-json-loggerFormats Python logging output as JSON, making…
permissive · top 1,000 on PyPI
JSON-log-formatterFormats Python logging records as JSON,…
permissive · top 5,000 on PyPI
logging-jsonFormats Python logging records as JSON output,…
permissive · top 15,000 on PyPI
coloredlogsAdds colored output to Python's standard…
permissive · top 1,000 on PyPI
colorlogAdds colored output to Python's standard…
permissive · top 1,000 on PyPI
pygtailPygtail reads only the new lines from a log…
copyleft · top 15,000 on PyPI
minilogMinilog wraps Python's standard logging module…
permissive · top 15,000 on PyPI
logging-formatter-anticrlfA drop-in replacement for Python's standard…
permissive · top 15,000 on PyPI