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

Florian Guily

04/29/2022, 10:26 AM
Hey, is there a folder where logs of a flow trigerred manually from terminal are saved ?
i

Izu

04/29/2022, 10:28 AM
Check in this directory
$HOME/.prefect/
gratitude thank you 1
f

Florian Guily

04/29/2022, 10:30 AM
seems to be the log when flows are triggered from cli or prefect cloud
maybe i should use cli next time ...
actually that's only from cloud
e

emre

04/29/2022, 10:35 AM
I don't think there is an out of the box file log for prefect core, only stdout. You can try adding a
FileHandler
to the default prefect logger though, I'm not sure if it will work.
gratitude thank you 1
f

Florian Guily

04/29/2022, 10:36 AM
yeah i'll be a little bit more cautious next time
thanks
a

Anna Geller

04/29/2022, 11:01 AM
Emre's idea about a
Emre's idea about a log handler is great. This might help: https://github.com/PrefectHQ/prefect/issues/3662#issuecomment-876657876 You could also, as you noticed, register and trigger the flow from CLI and then the logs will be stored in the backend. If this is your preference for local flow runs to store the terminal output into a file, you could do something simple like:
Copy code
python yourflow.py &> out.txt
f

Florian Guily

04/29/2022, 1:18 PM
I'll have a look at this thanks !
👍 1
9 Views