Skip to main content

Enable the default logging to output with color

Project description

colorlog

example

from colorlog import logging

logging.basicConfig(level=logging.DEBUG)

logging.debug("jawide")
logging.info("jawide")
logging.warning("jawide")
logging.error("jawide")
logging.critical("jawide")

setup

pip install colorlog-jawide

custom

from colorlog import init, Config, LogLevel, Color, Fore, Back, Style
import logging

init(logging, Config({
    LogLevel.DEBUG    : Color(Fore.GREEN, Style.BRIGHT),
    LogLevel.CRITICAL : Color(Fore.YELLOW, Back.RED, Style.NORMAL)
}))

logging.basicConfig(level=logging.DEBUG)

logging.debug("jawide")
logging.info("jawide")
logging.warning("jawide")
logging.error("jawide")
logging.critical("jawide")

build

rm -r ./build ./dist
python setup.py sdist bdist_wheel

test upload

python -m twine upload --repository testpypi dist/*

test pip

python -m pip install --index-url https://test.pypi.org/simple/ --no-deps colorlog-jawide

upload

python -m twine upload dist/*

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

colorlog-jawide-0.0.1.tar.gz (2.9 kB view hashes)

Uploaded Source

Built Distribution

colorlog_jawide-0.0.1-py3-none-any.whl (3.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page