def __redact_encrypt_request(self, record):
# type: (logging.LogRecord) -> None
"""Redact the ``Plaintext`` value from a kms:Encrypt request.
:param record: Logging record to filter
:type record: logging.LogRecord
"""
try:
parsed_body = json.loads(self.__to_str(cast(tuple, record.args)[-1]['body']))
parsed_body['Plaintext'] = _REDACTED
cast(tuple, record.args)[-1]['body'] = json.dumps(parsed_body, sort_keys=True)
except Exception: # pylint: disable=broad-except
return
评论列表
文章目录