Comment-driven python loggin package
Project description
Logger LOCO
LoCo = log via comments
Python >= 3.6 only
Usage:
import logging
from logger_loco import loco
logger = logging.getLogger('mylogger')
@loco(logger)
def somefunc(a, b):
# This is a regular comment
c = a + b
#@ This is debug
#- This is info
#! This is warning
#X This is error
#@ You could also use variables interpolation: {a} + {b} = {c}
somefunc(1, 2)
Will print:
DEBUG: This is debug
INFO: This is info
WARNING: This is warning
ERROR: This is error
DEBUG: You could also use variables interpolation: 1 + 2 = 3
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
logger-loco-0.0.1.tar.gz
(1.4 kB
view hashes)