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 | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file zato-enclog-1.0.7.tar.gz.
File metadata
- Download URL: zato-enclog-1.0.7.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.19.5 CPython/2.7.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
771e4d80710ed60602d362ce40def57f5a38960518071afa423202b6cfee2c0e
|
|
| MD5 |
166f7a4c8cade514d68c38a0cedff10c
|
|
| BLAKE2b-256 |
c9c81d54ec5b59e629cd96955b442d0aba51ee0210785177b69671dc21592f56
|
File details
Details for the file zato_enclog-1.0.7-py2-none-any.whl.
File metadata
- Download URL: zato_enclog-1.0.7-py2-none-any.whl
- Upload date:
- Size: 7.1 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.19.5 CPython/2.7.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fc46154ab860c27d3a9180cf050e35e00dc917904525875a66586c918192c171
|
|
| MD5 |
153ce53eb674bdd7ccaf34f606e81428
|
|
| BLAKE2b-256 |
7994c5ec583cda8cfe84cc259a4fc734c867c06c70239d88af32f6a43dce5f2f
|