'Should the handler flush its buffer?
Returns true if the buffer is up to capacity. This method can be
overridden to implement custom flushing strategies.'

def shouldFlush(self, record):

    return (len(self.buffer) >= self.capacity)
