https://prefect.io logo
v

Varun Joshi

02/19/2021, 3:27 PM
If I printed something in my flow, why can't I see it in my logs?
m

Marwan Sarieddine

02/19/2021, 3:29 PM
quoting the docs - you just have to add
log_stdout=True
Prefect tasks natively support forwarding the output of stdout to a logger. This can be enabled by setting 
log_stdout=True
 on your task.
Copy code
@task(log_stdout=True)
def log_my_stdout():
    print("I will be logged!")
upvote 4
🙌 1