Skip to content
Better, prettier commandline logging for Python--with colors! 👻
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
build/lib/console_logging
console_logging
images
tests
.gitignore
README.md
README.rst
Windows.MD
pipe
release
setup.cfg
setup.py fix spacing, minor improvements Mar 3, 2018

README.md

console-logging

Codeship Status for pshah123/console-logging PyPI version Codacy Badge

Better console logging for Python.

Find us on PyPi: https://pypi.python.org/pypi/console-logging

Showcase

Getting Started

Dependencies

  • Python 2.6+ or Python 3.5+
  • termcolor

Installation

pip install console-logging

If building from source: bash pipe from inside this repo.

Usage

New:

from console_logging.console import Console
console = Console()

console.log("Hello world!")

Old:

from console_logging import console

console.log("Hello World!")

Exhaustive Reference

console.log("This is a log.")
console.error("This is an error.")
console.info("This is some neutral info.")
console.success("This is a success message.")

# If using the new usage:
console.setVerbosity(4) # verbosity from 1 - 5, in order:
'''
[1] Errors
[2] Successes
[3] Logs
[4] Info
[5] Secure
'''
console.mute() # shorthand for setVerbosity(0)

Example

For an exhaustive example, see tests/example.py.

Credit

  • termcolor module for colors
You can’t perform that action at this time.