Logging formatter for fnndsc/pf* family, inspired by pfmisc.debug
Project description
pflogf
Colorful logging formatter for fnndsc/pf* family. Its hardcoded format displays displays time, hostname, and calling function. The various logging levels (debug, info, warn, error, critical) are printed in different colors.
pflogf aims to replace pfmisc/debug.py using the standard Python logging module.
Screenshots
The output is intended for full-screen TTY output.
It tries to detect when not enough colums are available to display full information.
Examples
import logging
from pflogf import FnndscLogFormatter
logger = logging.getLogger(__name__)
handler = logging.StreamHandler()
handler.setFormatter(FnndscLogFormatter())
logger.addHandler(handler)
logger.setLevel(logging.DEBUG)
logger.debug('debug me as I am full of bugs')
logger.info('an informative statement')
logger.warning('you\'ll probably ignore this warning')
logger.error('error, problem exists between keyboard and chair')
logger.critical('critical failure, haha jk')
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
pflogf-0.0.3.tar.gz
(3.3 kB
view hashes)