Skip to main content

Encrypted logger reusable in any Python application

Project description

  • Encrypted logger which stores everything using Fernet keys (AES128). Safe to use in environments that cannot store Personally Identifiable Information (PII) in clear text, such as HIPAA-compliant applications.
  • Comes with a command line tool that is used to decrypt logs, including both open and tail -f functionality.
  • Learn more about Fernet:
# stdlib
import logging

# Zato
from zato.enclog import EncryptedLogFormatter, genkey

level = logging.INFO
format = '%(levelname)s - %(message)s'

key = genkey()
formatter = EncryptedLogFormatter(key, format)

handler = logging.StreamHandler()

logger = logging.getLogger('')
logger.setLevel(level)'{"user":"Jane Xi"}')

# Shows the following
INFO - gAAAAABWYa17oiDoSMVjF8JM9DWzB3dtEvenW9laKqgsFl4d4ksbLCkoJzTyrI3nXKYVOcC03dhJ_BwfWlBN3CdGxJZAwMmfUbUzLHkqw2JeTzdgtz0YEGU=

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

zato-enclog-1.0.7.tar.gz (4.2 kB view hashes)

Uploaded source

Built Distribution

zato_enclog-1.0.7-py2-none-any.whl (7.1 kB view hashes)

Uploaded py2

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page