def __enter__(self):
    'Replace the handlers by this BufferingHandler'
    self.delayed_handlers.extend(self.delayed_logger.handlers)
    self.delayed_logger.handlers.clear()
    self.delayed_logger.addHandler(self)
    return self
Replace the handlers by this BufferingHandler
def __enter__(self):
    
    self.delayed_handlers.extend(self.delayed_logger.handlers)
    self.delayed_logger.handlers.clear()
    self.delayed_logger.addHandler(self)
    return self