'Apply the redaction rules to the record. This is done by calling
`record.getMessage()` to get the evaluated message string and applying the
redaction rules to it. If it turns out there is nothing to be redacted in
this string, the record is returned unmodified. Otherwise, the record\'s
`msg` is replaced with the redacted message, and it\'s `args` is set to
`None`.'

def filter(self, record):

    original_message = record.getMessage()
    message = self._redaction_engine.redact(original_message)
    if (message != original_message):
        record.msg = message
        record.args = None
    return True
