def _sanitize_log_msg(record):
    """
    Sanitize log message to make sure we can print out properly formatted JSON string
    :param record: log object
    :return: sanitized log object
    """
    return record.getMessage().replace('\n', '_').replace('\r', '_').replace('\t', '_')