@pytest.fixture
def caplog(_caplog):

    class PropogateHandler(logging.Handler):

        def emit(self, record):
            logging.getLogger(record.name).handle(record)
    logger.enable('panoptes')
    handler_id = logger.add(PropogateHandler(), format='{message}')
    (yield _caplog)
    with suppress(ValueError):
        logger.remove(handler_id)
@pytest.fixture
def caplog(_caplog):

    class PropogateHandler(logging.Handler):

        def emit(self, record):
            logging.getLogger(record.name).handle(record)
    logger.enable('panoptes')
    handler_id = logger.add(PropogateHandler(), format='{message}')
    (yield _caplog)
    with suppress(ValueError):
        logger.remove(handler_id)