Hi all, seems the local agent execute a flow run i...
# prefect-community
a
Hi all, seems the local agent execute a flow run in a separate process, I’d like to do some initializations at the very beginning of flow run, maybe right after the process is created . Is there any way to achieve that?
d
Hi @Alfie! What initializations do you have in mind? Does it make sense for them to occur in the first task of your flow?
a
thanks Dylan, I want to replace logger used in Prefect to comply with some standard, so some logger init code should be put there
d
Hmmmm
So I think there’s a “Prefect” way to create a custom logger
Do you want to replace the Prefect logger entirely because you want to stop sending logs to Prefect Cloud? I believe there’s a setting for that
a
not just that, i want to change format of the log too
d
Got it! So the doc I’ve linked above shows how to change the logs format
Let me find the setting to stop shipping logs to Cloud
Yup
So when you start or install your agent, you can pass
--no-cloud-logs
and Flows will not ship logs to Cloud
a
that’s great, much appriciated!
d
Anytime!