Skip to content

Logging Redactor 0.0.7 (2026-07-01)

Latest

Choose a tag to compare

@armurox armurox released this 30 Jun 21:53
51f40a0

Resolved Issues:

#12, reported by @declanatkins
#13, reported by @jhudis
#14, reported by @AdnanMuhib

Added Features:

  1. Redaction now applies to generic container types, including:
  • list
  • tuple
  • nametuple
  • deque

and any other container class that inherits from collections.abs.Sequence or collections.abc.Set

  1. Added loggingredactor.CommonPIIRedactingFilter, a filter preloaded with common PII patterns (email and phone numbers) and keys (passwords, tokens, etc.). User-supplied mask_patterns/mask_keys are combined with the built-ins rather than replacing them.

  2. Added per-country phone number redaction, in conjunction with the phonenumbers library

  3. Added a silent_failure keyword argument to all redacting filters to suppress a logged exception when the redacting filter fails.

  4. 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