https://prefect.io logo
#prefect-community
Title
# prefect-community
a

Andrei Tulbure

09/18/2022, 10:21 AM
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

Anna Geller

09/18/2022, 2:05 PM
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

Andrei Tulbure

09/18/2022, 4:52 PM
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

Anna Geller

09/18/2022, 7:04 PM
On the execution layer
a

Andrei Tulbure

09/19/2022, 8:07 AM
sorry. in the code do you mean ?
a

Anna Geller

09/19/2022, 10:07 AM
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

Andrei Tulbure

09/20/2022, 8:41 AM
solved the issue thanks a lot!
👍 1
4 Views