'For a MemoryHandler, flushing means just sending the buffered
records to the target, if there is one. Override if you want
different behaviour.'

def flush(self):

    self.acquire()
    try:
        if self.target:
            for record in self.buffer:
                self.target.handle(record)
            self.buffer = []
    finally:
        self.release()
