I'm trying to debug a flow running Prefect server but all the logs except for tasks start and end (e.g.
Task 'my_task': Starting task run...
and
Task 'my_task' :Finished task run for task with final state: 'Success'
) are not showing up. I'm trying to log info to help debugging within tasks like so
Copy code
@task
def my_task(x):
logger = prefect.context.get("logger")
<http://logger.info|logger.info>(f"Task input: {x}")
if isinstance(x, str):
logger.error("Not good. Input x is a string")
raise ValueError
return x
but nothing shows up in the logs on the server UI.
Any ideas what I can do so that logs show up?
k
Kevin Kho
08/17/2021, 2:27 PM
Hey @Alex Furrier, what executor are you using? Dask?
Kevin Kho
08/17/2021, 2:37 PM
Is this for a specific flow or happens across flows?
a
Alex Furrier
08/17/2021, 3:18 PM
Yep, Dask executor. It seems to happen across flows when executing on Dask but not on local execution
Bring your towel and join one of the fastest growing data communities. Welcome to our second-generation open source orchestration platform, a completely rethought approach to dataflow automation.