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 details)
File details
Details for the file pflogf-0.0.3.tar.gz
.
File metadata
- Download URL: pflogf-0.0.3.tar.gz
- Upload date:
- Size: 3.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b9d07eaf9731ce241c291b63e442501c6ad10072f9447548f4a05a7b377e57c3 |
|
MD5 | 5952b390b6d747dd6d927274a330bd1e |
|
BLAKE2b-256 | 25f1fb97757c50e4326fc8963b78d266f3fd535f9562a54aa94474d47823d592 |