https://prefect.io logo
n

Nelson Griffiths

02/02/2022, 9:58 PM
I am running into some unexpected behavior with extra loggers in prefect cloud. When I add my extra loggers to the config and run my flow with a local agent everything works as expected. When then switching to the DockerRun config and Bitbucket storage my extra loggers no longer get passed to the Cloud Logs. Is there something extra I need to be doing when moving from a local agent to a docker agent to get my logs to be passed through?
k

Kevin Kho

02/02/2022, 10:09 PM
Where is the config located? On your local? Does DockerRun have the config?
n

Nelson Griffiths

02/02/2022, 10:17 PM
The config is located on the machine where the Docker Agent is running. Does the config need to exist in the Docker Container being used by DockerRun?
k

Kevin Kho

02/02/2022, 10:19 PM
Yes but you can pass the env variable in the RunConfig
DockerRun(env={"PREFECT__LOGGING___EXTRA__LOGGERS": "['some_logger']"})
n

Nelson Griffiths

02/02/2022, 10:19 PM
Ah okay. I was under the impression that the agent needed it. Thanks for clarifiying!
k

Kevin Kho

02/02/2022, 10:20 PM
Note the syntax of
"
. It’s quite specific
👍 1