A colored logs package based on 'colored'
Project description
colored_logs
Install
pip install install colored-logs==0.0.2
or
pip3 install install colored-logs==0.0.2
Features
- Print different types of logs (info, success, warning, error, subtle)
- Add custom color for each type of log (override defauld values)
- Mark logs with custom ids (optional, defaults to no id)
- Show type for every log (optional, defaults to True)
- Show time of logging for every log (optional, defaults to True)
Usage
from colored_logs.logger import Logger
log = Logger(id='Test-id-1')
log.info('This is an info log')
log.success('This is a success log')
log.warning('This is a warning log')
log.error('This is an error log')
log.subtle('This is a subtle log')
log.set_id('Test-id-2')
log.info('This a log with a new id')
log.set_id('shortened-long_id-2')
log.info('This a log with a long id')
log.set_id(None)
log.info('This a log with no id')
log.set_print_log_type(False)
log.info('This a log with no log type')
log.set_print_time(False)
log.info('This a log with no time')
In action
Credit
This package relies on colored, which is maintained by dslackw
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
colored_logs-0.1.tar.gz
(8.0 kB
view hashes)
Built Distribution
colored_logs-0.1-py3-none-any.whl
(10.8 kB
view hashes)
Close
Hashes for colored_logs-0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6416ec17a99fdbf7e2e04c12a824180d885942cf2d6a0bb6bc069278d5d808ef |
|
MD5 | 1815ab7de2d2e07bc1c290563f259fb4 |
|
BLAKE2b-256 | c481e7520ed160779f4d7984b0fc1e953e9fb23d4d4bb17a3d5a7b0337e4d080 |