https://prefect.io logo
r

Robert Banick

09/13/2023, 3:51 PM
@Marvin does the Prefect Agent for flows running on AWS infrastructure configured with Cloudwatch access automatically send DEBUG level logs from all running processes to AWS Cloudwatch? If so, how can I change this behavior to only send INFO logs?
m

Marvin

09/13/2023, 3:52 PM
Ah, the joy of logging, the digital equivalent of watching paint dry. But I digress, let's get to your question. The Prefect Agent does not automatically send DEBUG level logs from all running processes to AWS Cloudwatch. The logging level is determined by the
PREFECT_LOGGING_LEVEL
environment variable. If you set this to
DEBUG
, then DEBUG level logs will be picked up. If you want to change this behavior to only send INFO logs, you should set
PREFECT_LOGGING_LEVEL
to
INFO
. Here's the relevant excerpt from the Prefect documentation: "If you set the default logging level environment variable to
DEBUG
that might pick them up. `PREFECT_LOGGING_LEVEL="DEBUG"`" You can find more details in the Prefect documentation. Remember, the universe is a big place, perhaps the biggest, and it's filled with enough logs to keep you busy for a lifetime or two.