sark
02/15/2021, 8:59 AM@prefect.task
def log(item):
<http://prefect.context.logger.info|prefect.context.logger.info>(item)
this works when you pass in the string output of an upstream task as the entirety of the input to the logging task
log(output)
but what if i want to do something like
log("the output of the previous task was: " + output)
here we have an issue because +
is not a task and so we will actually be logging something like
the output of the previous task was: Task<blah blah>
Kyle Moon-Wright
02/15/2021, 4:59 PM@prefect.task
def log(item):
<http://prefect.context.logger.info|prefect.context.logger.info>(f"Previous Task Output was: {item}")