def add_log_redaction_filter_to_logger(engine, logger):
 if engine.policies:
  redaction_filter = RedactionFilter(engine)
  for handler in logger.handlers:
   handler.addFilter(redaction_filter)

def add_log_redaction_filter_to_logger ( engine , logger ) : if engine . policies : redaction_filter = RedactionFilter ( engine ) for handler in logger . handlers : handler . addFilter ( redaction_filter )
add_redaction_filter injects the redaction filter into all of the logger handlers .