def convert_to_float(value_string, parser_info_out=None, suc_return=True):
    """
    Tries to make a float out of a string. If it can't it logs a warning
    and returns True or False if convertion worked or not.

    :param value_string: a string
    :returns value: the new float or value_string: the string given
    :returns: True or False
    """
    if parser_info_out is None:
        parser_info_out = {'parser_warnings': []}
    try:
        value = float(value_string)
    except TypeError:
        parser_info_out['parser_warnings'].append(
            'Could not convert: "{}" to float, TypeError'.format(value_string))
        if suc_return:
            return value_string, False
        else:
            return value_string
    except ValueError:
        parser_info_out['parser_warnings'].append(
            'Could not convert: "{}" to float, ValueError'.format(value_string)
            )
        if suc_return:
            return value_string, False
        else:
            return value_string
    if suc_return:
        return value, True
    else:
        return value
