Robust and effective logging for Python 2 and 3

logzero

Robust and effective logging for Python 2 and 3.

Features

  • Easy logging to console and/or (rotating) file.
  • Provides a fully configured standard Python logger object.
  • JSON logging (with integrated python-json-logger)
  • Pretty formatting, including level-specific colors in the console.
  • No dependencies
  • Windows color output supported by colorama
  • Robust against str/bytes encoding problems, works with all kinds of character encodings and special characters.
  • Multiple loggers can write to the same logfile (also across multiple Python files and processes).
  • Global default logger with logzero.logger and custom loggers with logzero.setup_logger(..).
  • Compatible with Python 2 and 3.
  • All contained in a single file.
  • Licensed under the MIT license.
  • Heavily inspired by the Tornado web framework.

Installation:

python -m pip install logzero

Example Usage

 

 

 

To finish reading, please visit source site