Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

A context manager to deal with logging level as context manager.

Project Description

Logging as a context manager.

Visually inspired by how Credo looks like, I always find difficult to communicate with user in command line interface. So this is a logging/printing system which is more block based than line base, and with color also.

The following will show a nice formatted message :

with Message('Hello there') as log:
    log('This is a Logging message context manager')
    log('it support nesting and will render in a User friendly way')
    log('I need to fix multi \nline \nstring')

You can nest these:

with Message('Hello there') as log:
    log('This is a Logging message context manager')
    log('it support nesting and will render in a User friendly way')
    log('I need to fix multi \nline \nstring')
    with Warning('Nested it does support') as log1:
        log1('like Yoda speach order ')
        log1('of words are')

    with Critical('Come to the dark side') as log2:
        log2('we have cookies')

        with OK("Paternity test") as log3:
            log3('I am your father')

To get nested messages:

Release History

Release History

This version
History Node

0.0.3

History Node

0.0.2

History Node

0.0.1

Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
withlog-0.0.3-py2.py3-none-any.whl (10.5 kB) Copy SHA256 Checksum SHA256 py2.py3 Wheel Dec 7, 2015

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting