Logging package with color and encryption support
Project description
dcclog
dcclog is a simple wrapper around the python logging module that makes it easy to colorize and encrypt log messages.
Installation
From pypi:
$ pip install dcclog
with built-in ciphers:
$ pip install 'dcclog[cipher]'
From github:
$ git clone https://github.com/jamazi/dcclog.git
$ cd dcclog
$ pip install '.[all]'
How To use dcclog
import dcclog
dcclog.default_config()
logger = dcclog.getLogger(name=__name__)
logger.error("error message.")
logger.warning("warning message.")
logger.info("info message.")
logger.debug("debug message.")
@dcclog.log
def logged_function(x: int, y: int) -> int:
return x + y
logged_function(4, 6)
or with RSA encryption:
import dcclog
from dcclog.cipher.rsa import RSAEncryption
dcclog.default_config(
level=dcclog.INFO,
filename=".logs/app.log",
cipher=RSAEncryption("pubkey.pem"),
)
logger = dcclog.getLogger(name=__name__)
logger.error("error message.")
logger.warning("warning message.")
logger.info("info message.")
logger.debug("debug message.")
@dcclog.log
def logged_function(x: int, y: int) -> int:
return x + y
logged_function(4, 6)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
dcclog-0.9.1.tar.gz
(9.1 kB
view hashes)
Built Distribution
dcclog-0.9.1-py3-none-any.whl
(11.4 kB
view hashes)