'Update a item in the log list'

def _update_item(self, item_index, item_state, item_type, item_value, proc_list, proc_desc, peak_time):

    if ((item_state == 'OK') or (item_state == 'CAREFUL')):
        self.reset_process_sort()
        endtime = time.mktime(datetime.now().timetuple())
        if ((endtime - self.logs_list[item_index][0]) > peak_time):
            self.logs_list[item_index][1] = endtime
        else:
            self.logs_list.remove(self.logs_list[item_index])
    else:
        if (item_state == 'CRITICAL'):
            self.logs_list[item_index][2] = item_state
        if (item_value > self.logs_list[item_index][4]):
            self.logs_list[item_index][4] = item_value
        elif (item_value < self.logs_list[item_index][6]):
            self.logs_list[item_index][6] = item_value
        self.logs_list[item_index][7] += item_value
        self.logs_list[item_index][8] += 1
        self.logs_list[item_index][5] = (self.logs_list[item_index][7] / self.logs_list[item_index][8])
        if (item_state == 'CRITICAL'):
            self.logs_list[item_index][9] = sort_stats(proc_list, glances_processes.sort_key)[0:3]
            self.logs_list[item_index][11] = glances_processes.sort_key
        self.logs_list[item_index][10] = proc_desc
    return True
