Pedro Machado
12/14/2021, 3:42 PMloguru
https://github.com/Delgan/loguru
It's used inside of a task. When I run the flow locally, I see the loguru output but when it runs remotely (ECS), I don't see the logs in Prefect Cloud. How could I get it to write to the Prefect logs?
Also, how should I set up my ECS flow to get it to write the container logs to cloudwatch?
Thanks!Kevin Kho
Kevin Kho
task_definition = yaml.safe_load(
"""
cpu: 1024
memory: 2048
containerDefinitions:
- name: flow
logConfiguration:
logDriver: awslogs
options:
awslogs-group: /ecs/prefect-agent
awslogs-region: us-east-1
awslogs-stream-prefix: ecs
awslogs-create-group: 'true'
"""
Kevin Kho
Kevin Kho
Pedro Machado
12/14/2021, 5:17 PMPREFECT__LOGGING__EXTRA_LOGGERS="['snowflake.connector', 'boto3', 'custom_lib']"
Kevin Kho
@task(log_stdout=True)
if the logs go to stdout?
Or maybe add loguru?