Repository navigation
Resolved Issues:
#12, reported by @declanatkins
#13, reported by @jhudis
#14, reported by @AdnanMuhib
Added Features:
- Redaction now applies to generic container types, including:
listtuplenametupledeque
and any other container class that inherits from collections.abs.Sequence or collections.abc.Set
-
Added
loggingredactor.CommonPIIRedactingFilter, a filter preloaded with common PII patterns (email and phone numbers) and keys (passwords, tokens, etc.). User-suppliedmask_patterns/mask_keysare combined with the built-ins rather than replacing them. -
Added per-country phone number redaction, in conjunction with the phonenumbers library
-
Added a
silent_failurekeyword argument to all redacting filters to suppress a logged exception when the redacting filter fails. -
Added support for python 3.13 and 3.14 as requested in issue #13
Bug Fixes:
- Now redacts sensitive data exposed through an object's str/repr when it is logged, even if the object's type is not one of the explicitly handled types (e.g. a custom class whose str returns an email). The original object is left untouched, and numeric
conversions such as %d/%f continue to use the real value since only str/repr are redacted. (Reported in issue #12) - Added support for mapping types with non-standard constructors, such as Django's QueryDict. (Reported in issue #14)
- Application crashes due to errors in loggingredactor no longer occur. loggingredactor will produce a handled logger.exception on the originating logger and logging continues with the record otherwise intact. (Reported in issue #14)
- A field whose name is in mask_keys is now masked wholesale regardless of its value's type. Previously a container value (e.g. a dict or list) under a masked key was recursed into rather than masked, which could leave its contents unredacted.
What's Changed
Full Changelog: 0.0.6...0.0.7