def register_log_filtering(policy):
 if policy:
  global_redaction_engine.add_policy(policy)
  logfilter.add_log_redaction_filter_to_logger(global_redaction_engine, logging.root)

def register_log_filtering ( policy ) : if policy : global_redaction_engine . add_policy ( policy ) logfilter . add_log_redaction_filter_to_logger ( global_redaction_engine , logging . root )
add_redaction_filter injects the redaction filter into all of the logger handlers .