Hello! I'm experimenting with serverless workqueu...
# ask-community
c
Hello! I'm experimenting with serverless workqueues. I am using Prefect Cloud, triggering containers stored in AWS ECR. I have created a demo flow, built the encapsulating Docker image, shipped it to ECR, deployed my flow to Prefect and successfully run an instance of the image. So far, so good. The image is a simple python script (obviously) generating a few log message via python's logging library. No special configuration applied - it's logging to stdout. Flows are annotated
@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?
🤔 1
k
Hi Cormac, the
log_prints
setting controls whether
print()
calls are treated as logs. For more typical python logging, try `get_run_logger()`:
Copy code
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.