Hello Everyone. Quick questions. My prefect flow f...
# ask-community
a
Hello Everyone. Quick questions. My prefect flow failed and the logs are not helping that much. I get a long stack trace error without anything specific. How can I know that I have a problem with the infra, or with the code ? If you need more details please help me frame my question better.
1
a
can you try running the same flow locally? if this works, you could determine whether this is a flow code or infra issue
if existing logs are not helpful, you can try enabling DEBUG logs e.g.
Copy code
prefect config set PREFECT_LOGGING_LEVEL=DEBUG
a
It runs locally, but it takes a slightly different route than via Prefect cloud
Where should I enable debug logs ? In the code, just after declaring my flow?
a
On the execution layer
a
sorry. in the code do you mean ?
a
I meant on the agent/infrastructure block
e.g.:
Copy code
prefect config set PREFECT_LOGGING_LEVEL=DEBUG
prefect agent start -q yourqueue
or:
Copy code
from prefect.infrastructure import Process

process_block = Process(env={"PREFECT_LOGGING_LEVEL": "DEBUG"})
process_block.save("prod", overwrite=True)
a
solved the issue thanks a lot!
👍 1