Description
KubernetesPodOperator (KPO) reads stdout/stderr from pod containers and writes them to Airflow task logs. During ttitlhis process, all log lines are hardcoded to INFO level, making it impossible to distinguish between DEBUG, WARNING, and ERROR messages in the Airflow UI — regardless of what level the pod application originally emitted.
https://github.com/apache/airflow/blob/main/providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/utils/pod_manager.py#L432-L450
Use case/motivation
- A pod application logs ERROR: database connection failed, but the Airflow UI displays it as INFO. Users scrolling through thousands of log lines have no way to quickly spot the actual error.
- A team configures Airflow's logging_level to suppress DEBUG output in production, but pod DEBUG logs still appear because KPO has already recorded them all as INFO.
- An alerting pipeline watches Airflow task logs for ERROR-level entries to trigger PagerDuty notifications, but it never fires — because pod errors are indistinguishable from normal INFO output.
Related issues
No response
Are you willing to submit a PR?
Code of Conduct
Description
KubernetesPodOperator (KPO) reads stdout/stderr from pod containers and writes them to Airflow task logs. During ttitlhis process, all log lines are hardcoded to INFO level, making it impossible to distinguish between DEBUG, WARNING, and ERROR messages in the Airflow UI — regardless of what level the pod application originally emitted.
https://github.com/apache/airflow/blob/main/providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/utils/pod_manager.py#L432-L450
Use case/motivation
Related issues
No response
Are you willing to submit a PR?
Code of Conduct