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
Development
Deploy package to <test.pypi.org>:
python3 setup.py sdist
python3 -m twine upload ---repository-url https://test.pypi.org/legacy/ dist/*
Deploy package to <pypi.org>:
python3 setup.py sdist
python3 -m twine upload dist/*
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.5.tar.gz
(2.3 kB
view details)
File details
Details for the file logger-loco-0.0.5.tar.gz
.
File metadata
- Download URL: logger-loco-0.0.5.tar.gz
- Upload date:
- Size: 2.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.0.0 requests-toolbelt/0.8.0 tqdm/4.43.0 CPython/3.6.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 287ca382aad096049e2681b472a6b3dc69d6d1ad8b2bb36f19fbb42fb6bc9ab6 |
|
MD5 | f41dbaa47743fb2092971894bca3e58f |
|
BLAKE2b-256 | 02af51d2847af8187aed6a075bc163f7f99dc5395c5dfce5daf112e0e53256d1 |