Arlo Bryer
03/05/2020, 5:06 PMlogger
). I was hoping that I could perhaps add this as an extra logger to Prefect (or add Prefect’s logger as one of the handlers), resulting in getting logs in cloud and on local stderr.
Has anyone set up something similar to this before?
(I tried naively adding the package logger to Prefect’s PREFECT_LOGGING_EXTRA_LOGGERS
env var, but this doesn’t seem to have worked as expected).Laura Lorenz (she/her)
03/05/2020, 5:12 PMArlo Bryer
03/05/2020, 5:14 PMLaura Lorenz (she/her)
03/05/2020, 5:14 PMArlo Bryer
03/05/2020, 5:14 PMEXTRA_LOGGERS
env var isn’t doing this for meecho $PREFECT__LOGGING__EXTRA_LOGGERS
['worker.integrations.dealroom.downloader']
worker/integrations/dealroom/downloader.py
logger = logging.getLogger(__name__)
get_logger
from prefect.utilities.logging
and adding that as a handler to the logger in that moduleCloudHandler
directly as you sayLaura Lorenz (she/her)
03/05/2020, 5:21 PMArlo Bryer
03/05/2020, 5:21 PMworker.integrations
and getting all loggers under thatintegrations.<package>.py
josh
03/05/2020, 5:24 PMPREFECT__LOGGING__EXTRA_LOGGERS
that was patched in 0.9.6
. If you upgrade your Prefect version and set it as a string representation of a list then it should be parsed properly! e.g.
export
PREFECT__LOGGING__EXTRA_LOGGERS= "['your_extra_logging_package']"
Arlo Bryer
03/05/2020, 5:27 PMLaura Lorenz (she/her)
03/05/2020, 5:27 PMArlo Bryer
03/05/2020, 5:27 PM