def shouldFlush(self, record):
        return (len(self.buffer) >= self.capacity) or \
                (record.levelno >= self.flushLevel)
Check for buffer full or a record at the flushLevel or higher.
dataset/ETHPy150Open azoft-dev-team/imagrium/env/Lib/logging/handlers.py/MemoryHandler.shouldFlush