2👍
✅
task.get_logger
supports a logfile
argument, so you should be able to do something like this:
@task
def mytask():
logger = self.get_logger(logfile="foo.log")
logger.info("logging from mytask")
Source:stackexchange.com