Keep personal data out of your logs
Project description
Logstop.py
:fire: Keep personal data out of your logs
logger.info('Hi test@example.org!')
# Hi **********!
By default, scrubs:
- email addresses
- phone numbers
- credit card numbers
- Social Security numbers (SSNs)
- passwords in URLs
Works even when data is URL-encoded with plus encoding
Installation
Run:
pip install logstop
And add it to your logger:
from logstop import LogstopFilter
logger.addFilter(LogstopFilter())
Options
To scrub IP addresses (IPv4), use:
LogstopFilter(ip=True)
To scrub MAC addresses, use:
LogstopFilter(mac=True)
Disable default rules with:
LogstopFilter(
email=False,
phone=False,
credit_card=False,
ssn=False,
url_password=False
)
Notes
- To scrub existing log files, check out scrubadub
- To scan for unencrypted personal data in your database, check out pdscan
History
View the changelog
Contributing
Everyone is encouraged to help improve this project. Here are a few ways you can help:
- Report bugs
- Fix bugs and submit pull requests
- Write, clarify, or fix documentation
- Suggest or add new features
To get started with development:
git clone https://github.com/ankane/logstop.py.git
cd logstop.py
pip install -r requirements.txt
pytest
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
Close
Hashes for logstop-0.1.3-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 43042b5e04a8f59c67989dd570ef7625bf8e17c35e98562ec78ffaf204a5a679 |
|
MD5 | 2f5c8cf979f90f596efd5cb3c5861497 |
|
BLAKE2b-256 | 66483c60bb3fd5bfdcc45c13b3d2c0f821c72ba73da61a3e72a1114f1d6e4703 |