def read_attribute_key_value(tag, content, date_parser, values_dict, set_attributes_to_read):
    """
    Reads an attribute from the line of the log

    Parameters
    --------------
    tag
        Tag
    content
        Full content of the line
    date_parser
        Date parser
    values_dict
        Dictionary of keys/values already met during the parsing
    set_attributes_to_read
        Names of the attributes that should be parsed. If None, then, all the attributes are parsed.

    Returns
    --------------
    key
        Key of the attribute
    value
        Value of the attribute
    """
    key = content[1]
    value = None

    if set_attributes_to_read is None or key in set_attributes_to_read:
        if tag.startswith("string"):
            value = content[3]
        elif tag.startswith("date"):
            value = date_parser.apply(content[3])
        elif tag.startswith("int"):
            value = int(content[3])
        elif tag.startswith("float"):
            value = float(content[3])
        else:
            value = content[3]

        # limits the number of different instantiations of the same key
        if key in values_dict:
            key = values_dict[key]
        else:
            values_dict[key] = key

        # limits the number of different instantations of the same value
        if value in values_dict:
            value = values_dict[value]
        else:
            values_dict[value] = value

    return key, value