Skip to main content

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 Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dcclog-0.10.0-py3-none-any.whl (12.4 kB view details)

Uploaded Python 3

File details

Details for the file dcclog-0.10.0-py3-none-any.whl.

File metadata

  • Download URL: dcclog-0.10.0-py3-none-any.whl
  • Upload date:
  • Size: 12.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.10

File hashes

Hashes for dcclog-0.10.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cffaa12a0e1099d63ccb0cefb3629c2db41f675976a6f9ff01a38c6c9803005b
MD5 2087ea4dae4ac430ae277a509aa8e385
BLAKE2b-256 787e1b22ed1a90e7efc06f475c02ee61e17005c8ad42db67ac82f343855bab0f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page