Satheesh K
06/07/2021, 10:14 AMrun_config
while building the flow, but it seems not working.emre
06/07/2021, 10:29 AMflow.run()
? run_config
is for registering a flow to prefect server or cloud, I don't think it would effect a run triggered by flow.run()
Satheesh K
06/07/2021, 10:43 AMflow.run()
. Do you know how to suppress logs in this case?Greg Roche
06/07/2021, 10:53 AMprefect.config.logging.level
to WARN
(or whatever) in your code, or change the environment variable PREFECT__LOGGING__LEVEL
in the env where you're executing flow.run()
Satheesh K
06/07/2021, 10:55 AMprefect.config.logging.level=DEBUG
. it is not working.Greg Roche
06/07/2021, 10:57 AMDEBUG
then all messages of all severity will be shown. If you want to suppress messages, you need to set the logging level at a higher level than the messages you want to see.Satheesh K
06/07/2021, 10:57 AMSatheesh K
06/07/2021, 11:13 AMprefect.config.logging.level=ERROR
and os.environ["PREFECT__LOGGING__LEVEL"] = "ERROR"
Satheesh K
06/07/2021, 11:25 AMos.environ["PREFECT__LOGGING__LEVEL"] = "ERROR"
before importing prefect as I read in some other thread in this forum, but still there is no run level control. Ideally I would want to pass it as argument in flow.run()
whether to print logs or not.emre
06/07/2021, 12:49 PMprefect.utilities.logging.prefect_logger
, all other loggers of prefect are children to this logger. using setLevel on this can act as a run level control. This worked on my try.
prefect.utilities.logging.prefect_logger.setLevel("ERROR")
Looks hacky, but I can't think of anything else.
Also I lack experience on logging module, so there might be better ways to do this, idk.emre
06/07/2021, 12:50 PMprefect_logger
is initialized within import prefect