airflow.providers.common.ai.utils.task_logger

A structlog logger that writes to the task log on Airflow 2 and Airflow 3.

Functions

get_task_logger()

Return a structlog logger that writes to the task log.

Module Contents

airflow.providers.common.ai.utils.task_logger.get_task_logger()[source]

Return a structlog logger that writes to the task log.

Airflow 3 configures structlog for task processes. Airflow 2 does not, so structlog there falls back to its defaults and prints every level, debug included, to stdout. On Airflow 2 the logger wraps the airflow.task stdlib logger instead, which applies the task log’s level and handlers, without changing the process-wide structlog configuration.

Was this entry helpful?