Cormac
10/20/2023, 3:38 PM@flow(log_prints=True)
However, in the Prefect Cloud UI , I cannot see the logs generated by the image.
What am I failing to configure?Kevin Grismore
10/20/2023, 5:43 PMlog_prints
setting controls whether print()
calls are treated as logs. For more typical python logging, try `get_run_logger()`:
from prefect import flow, get_run_logger
@flow(name="log-example-flow")
def logger_flow():
logger = get_run_logger()
<http://logger.info|logger.info>("INFO level log message.")
Our docs on logging go into more detail.