https://prefect.io logo
Title
a

Alex Furrier

08/16/2021, 10:08 PM
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
@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?
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
k

Kevin Kho

08/17/2021, 3:25 PM
Does it happen to other flows with DaskExecutor?