NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI
PyPI, #4664 most downloaded on PyPI
Robust and effective logging for Python 2 and 3
Latest stable
1.7.0
Last release 6 years ago
no release in 18 months
Ships unpredictably
gaps range from 8 days to 2.7 years
Most releases are documented
notes for 13 of 16 stable releases
Nothing withdrawn
no release was ever pulled
9 years old
16 releases · first in 2017
Drag across the ruler to compare, or tap a release to open it.
Export loglevels directly (you can use eg. logzero.DEBUG instead of logging.DEBUG)
logzero.DEBUG instead of logging.DEBUG)setup_default_logger use backupCountJSON logging with UTF-8 enabled by default (PR 357)
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →
JSON logging support ([PR 344][])
- logzero.syslog(..) ([PR 83][])
logzero.syslog(..) ([PR 83][])Allow Disabling stderr Output ([PR 83][1])
Nothing published for this version
Color output now works in Windows (supported by colorama)
Logfiles with custom loglevels (eg. stream handler with DEBUG and file handler with ERROR).
Way better API for configuring the default logger with logzero.loglevel(..) , logzero.logfile(..) , etc.
import logging
import logzero
from logzero import logger
# This log message goes to the console
logger.debug("hello")
# Set a minimum log level
logzero.loglevel(logging.INFO)
# Set a logfile (all future log messages are also saved there)
logzero.logfile("/tmp/logfile.log")
# Set a rotating logfile (replaces the previous logfile handler)
logzero.logfile("/tmp/rotating-logfile.log", maxBytes=1000000, backupCount=3)
# Disable logging to a file
logzero.logfile(None)
# Set a custom formatter
formatter = logging.Formatter('%(name)s - %(asctime)-15s - %(levelname)s: %(message)s');
logzero.formatter(formatter)
# Log some variables
logger.info("var1: %s, var2: %s", var1, var2)
Better reconfiguration of handlers, doesn't remove custom handlers anymore
Nothing published for this version
Bugfix: Disabled color logging to logfile
- Cleanup and documentation
Working logzero package with code and tests
[PR 344]: https://github.com/metachris/logzero/pull/344 [\#82]: https://github.com/metachris/logzero/issues/82 [\#342]: https://github.com/metachris/l
One column per quarter.