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)
Release files for dcclog 0.10.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dcclog-0.10.0-py3-none-any.whl | Python 3 | none | any | Details |
Release files / dcclog-0.10.0-py3-none-any.whl
| Download URL | dcclog-0.10.0-py3-none-any.whl |
|---|---|
| Size | 12.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cffaa12a0e1099d63ccb0cefb3629c2db41f675976a6f9ff01a38c6c9803005b
|
|
BLAKE2b-256 checksum How to use checksums |
787e1b22ed1a90e7efc06f475c02ee61e17005c8ad42db67ac82f343855bab0f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.10
|