Selora
03/10/2025, 5:41 PMMarvin
03/10/2025, 5:42 PMWARNING
or ERROR
) to suppress INFO
and DEBUG
messages. Here's a concise way to do it:
python
import logging
from prefect import flow
# Set the logging level to WARNING to suppress lower level logs
logging.getLogger("prefect").setLevel(logging.WARNING)
@flow
def my_flow():
return "Flow result"
if __name__ == "__main__":
result = my_flow()
print(result)
This will ensure that only warnings and errors are printed, allowing you to focus on the flow's result.
For more information on configuring logging in Prefect, you can refer to the Prefect logging documentation.