Hey, is there a folder where logs of a flow triger...
# ask-community
f
Hey, is there a folder where logs of a flow trigerred manually from terminal are saved ?
i
Check in this directory
$HOME/.prefect/
gratitude thank you 1
f
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
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
yeah i'll be a little bit more cautious next time
thanks
a
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
I'll have a look at this thanks !
👍 1