@property
    def counts(self):
        self.acquire()
        try:
            captured = collections.defaultdict(int)
            for r in self._records:
                captured[r.levelno] += 1
            return captured
        finally:
            self.release()
Returns a dictionary with the number of records at each level.
dataset/ETHPy150Open openstack/taskflow/taskflow/test.py/CapturingLoggingHandler.counts