No project description provided
Project description
Shadowlogger
Simple wrapper for built-in logger module which intercepts all logs and shadows them, preventing sensitive information from being leaked.
Installation
pip install shadowlogger
Usage
import shadowlogger
# Activate shadowlogger
shadowlogger.manager.install()
# Deactivate shadowlogger
shadowlogger.manager.uninstall()
or
from shadowlogger.shadowlogger import ShadowLogger
class MyCustomLogger(ShadowLogger):
# override these to customize the logger
prefix: str
name: str
message_format: str
log_level: int
# override this to handle the formatted message
def handle_message(self, formatted_message: str, level_name: str):
pass
Testing
python -m unittest discover -s tests
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
shadowlogger-0.1.1.tar.gz
(19.7 kB
view details)
Built Distribution
File details
Details for the file shadowlogger-0.1.1.tar.gz
.
File metadata
- Download URL: shadowlogger-0.1.1.tar.gz
- Upload date:
- Size: 19.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d5e6358007fa961038411ca9a146ca52f077b1672f6d5ac30985dfb27d757a2a |
|
MD5 | 98fae8e0f975a76ac7c61f0101af05c2 |
|
BLAKE2b-256 | a5af3c233234d2838abf9d49774c53ad98d3b8f67fe4831a97d5f527ce0f63bd |
File details
Details for the file shadowlogger-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: shadowlogger-0.1.1-py3-none-any.whl
- Upload date:
- Size: 19.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8b739feaf1007c14d31b8e0d71913e30720c36c202da8daddb2974c524d32a26 |
|
MD5 | d3404983c20c5380258aca8f4044e7ee |
|
BLAKE2b-256 | ccfa0c4f9afc0429d013a35f6770ed06696afc59007f9b70d7d074ec1caa6763 |