Skip to main content

rainbow_logging_handler

https://travis-ci.org/laysakura/rainbow_logging_handler.png?branch=master

Ultimate Python colorized logger.

Usage

http://github.com/laysakura/rainbow_logging_handler/raw/master/doc/screenshot.png

This script runs like above screenshot.

import sys
import logging
from rainbow_logging_handler import RainbowLoggingHandler

if __name__ == '__main__':
    root_logger = logging.getLogger()
    root_logger.setLevel(logging.DEBUG)

    handler = RainbowLoggingHandler(sys.stderr)
    formatter = logging.Formatter("%(asctime)s - %(name)s - %(levelname)s - %(message)s")
    handler.setFormatter(formatter)
    root_logger.addHandler(handler)
    logger = logging.getLogger('test')

    logger.debug("debug msg")
    logger.info("info msg")
    logger.warn("warn msg")
    logger.error("error msg")
    logger.critical("critical msg")

    try:
        raise RuntimeError("Opa!")
    except Exception as e:
        logger.exception(e)

Install

Install from PyPI

$ pip install rainbow_logging_handler

Install from Github repo

$ git clone https://github.com/laysakura/rainbow_logging_handler.git
$ cd rainbow_logging_handler
$ ./setup.py install

Author

Mikko Ohtamaa <mikko@opensourcehacker.com>, Sho Nakatani <lay.sakura@gmail.com>

License

This is free and unencumbered public domain software. For more information, see <http://unlicense.org/> or the accompanying LICENSE.txt file.

Metadata

Release files for rainbow_logging_handler 1.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rainbow_logging_handler 1.0.3
File Size Uploaded
rainbow_logging_handler-1.0.3.zip 9.1 kB Details

Release files / rainbow_logging_handler-1.0.3.zip

Download URL rainbow_logging_handler-1.0.3.zip
Size 9.1 kB
Tags Source
SHA-256 checksum
How to use checksums
c23a3ae5d458797d0babd90a010e59c1ab468f706d6af755f3fad05d80e4ba20
BLAKE2b-256 checksum
How to use checksums
f35fc4bafc8e170f843462a2b2ad672786b5f886eedf5f6dcf0e0cacae81a4b4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

2.2.2

1 release file

2.2.1

1 release file

2.2.0

1 release file

2.1.2

1 release file

2.1.1

1 release file

2.1.0

1 release file

2.0.2

1 release file

2.0.1

1 release file

2.0.0

1 release file

1.0.4

1 release file

This release

1.0.3 This release

1 release file

1.0.2

1 release file

1.0.1

1 release file

1.0.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page