Skip to main content
Help us improve PyPI by participating in user testing. All experience levels needed!

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: https://cryptography.io/en/latest/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()
handler.setFormatter(formatter)

logger = logging.getLogger('')
logger.addHandler(handler)
logger.setLevel(level)

logger.info(b'{"user":"Jane Xi"}')

# Shows the following
INFO - gAAAAABWYa17oiDoSMVjF8JM9DWzB3dtEvenW9laKqgsFl4d4ksbLCkoJzTyrI3nXKYVOcC03dhJ_BwfWlBN3CdGxJZAwMmfUbUzLHkqw2JeTzdgtz0YEGU=

Project details


Release history Release notifications

This version
History Node

1.0.5.post2

History Node

1.0.5.post1

History Node

1.0.5

History Node

1.0.4

History Node

1.0.3

History Node

1.0.2.post4

History Node

1.0.2.post3

History Node

1.0.2.post1

History Node

1.0

Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
zato-enclog-1.0.5.post2.tar.gz (4.0 kB) Copy SHA256 hash SHA256 Source None Dec 14, 2015

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page