Dead-simple logging: just function composition
Project description
Dslog
Dead-simple logging: just function composition
from dslog import Logger
logger = Logger.of(print) \
.limit('WARNING') \
.format(lambda *objs, level, (f'[green][{level}][/]', *objs))
logger('My message', ..., level='INFO')
# doesn't print anything
logger('Oops!', { 'more': 'details' }, level='WARNING')
# [WARNING] Oops! { 'more', 'details' } ([WARNING] in green)
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
dslog-0.1.0.tar.gz
(3.0 kB
view hashes)
Built Distribution
dslog-0.1.0-py3-none-any.whl
(4.1 kB
view hashes)