My understanding is that @after_setup_logger.connect is supposed to allow you to attach custom handlers. However, this does not work for me.
@after_setup_logger.connectdef setup_loggers(logger: logging.Logger, *args, **kwargs): h = LogCollector() logger.addHandler(h) # or even logger.getLogger().addHandler(h)@app.task()def add(x: int, y: int): result = x + y logger.info(f"Add: {x} + {y} = {result}") return resultInside the add function, logger does not have handlers. What am I doing wrong?