https://prefect.io logo
t

Tony Yun

07/12/2023, 6:38 PM
Hi, is there a config can makes logging streamed to UI? I find out that the logs only show up when the flow finishes.
j

jpuris

07/12/2023, 7:27 PM
The logs are already streamed to UI. 😕 Do you have an example?
I can only fetch the logs through kubectl command
j

jpuris

07/12/2023, 7:28 PM
The only thing I can think of is that there is some sort of child process i.e. batch process that does not output any logs until the logs are collectable by python
I can only fetch the logs through kubectl command
Ah yea 😕 I don't think you can.. This is because python sees the logs only after kubectl command is done
t

Tony Yun

07/12/2023, 7:28 PM
what you mean?
I see
Prefect1 does stream logs even before pod finishes
j

jpuris

07/12/2023, 7:31 PM
how is kubectl run from prefect1 vs prefect2?
t

Tony Yun

07/12/2023, 7:32 PM
it’s deployed to a k8s cluster which any flow will run as a pod. it’s the same thing to us in prefect 1 and 2
j

jpuris

07/12/2023, 7:34 PM
Ah! I think I have misunderstood you. You are not able to see any flow logs until the flow is done, when running on k8s?
t

Tony Yun

07/12/2023, 7:35 PM
Let me call that back. I think it lags much time than the real logs
j

jpuris

07/12/2023, 7:36 PM
Certain delay is to be expected, I believe. In other words, I'd not expect the flow logs to appear instantaneously on the UI.
t

Tony Yun

07/12/2023, 7:37 PM
I think it’s about > 10minutes level. But maybe because I didn’t refresh the page?
are we supposed to keep refresh the page to see updated logs?
j

jpuris

07/12/2023, 7:38 PM
10 minutes is little too long 😓.. I'm not sure what are the rules when it comes to worker / agent shipping logs to server, when running flows on k8s.
t

Tony Yun

07/12/2023, 7:39 PM
I noticed I have to click some other button and click back logs to see some logs even after the flow run finishes
j

jpuris

07/12/2023, 7:43 PM
If that is the case, then perhaps would be worthwhile to ask in #prefect-ui about the log window refresh rate 🤷
t

Tony Yun

07/12/2023, 7:56 PM
ok thanks!