def METHOD_NAME(self):
    n = 0
    last = {}
    for line in self.stream:
        now = time.time()
        print(line.strip())
        try:
            pkt = json.loads(line)
        except json.decoder.JSONDecodeError as e:
            print("Parse error: %s" % e.msg)
            continue
        if not isinstance(pkt, dict):
            print("Not a dict/object: %r" % pkt)
            continue
        try:
            ts = dateutil.parser.isoparse(pkt.pop("time")).timestamp()
        except KeyError:
            ts = now
        if int(ts) == ts:
            # Check above in case we start getting fed non-integer timestamps already.
            # If not, use current precise time instead.
            if abs(now - (ts + 0.5)) < 1:
                ts = now
        id = self.grab_id(pkt)
        ago = ts - last.get(id, 0)
        last[id] = ts
        if ago < self._MIN_REPEAT_SECS:
            new = []
            for k, v in pkt.items():
                try:
                    new.append((ts, id, k, float(v)))
                except (ValueError, TypeError):
                    print("%s{%r} has non-numeric value %s" % (k, id, v))
                    continue
            self.log += new
        n += 1
        if (n % self._LOG_CLEAN_INTERVAL) == 0:
            self.clean_log()