Skip to content

Fix: Restore live stdout logging for Elasticsearch in Airflow 3#64067

Open
Subham-KRLX wants to merge 1 commit intoapache:mainfrom
Subham-KRLX:fix-task-logs-stdout-es-os
Open

Fix: Restore live stdout logging for Elasticsearch in Airflow 3#64067
Subham-KRLX wants to merge 1 commit intoapache:mainfrom
Subham-KRLX:fix-task-logs-stdout-es-os

Conversation

@Subham-KRLX
Copy link
Contributor

@Subham-KRLX Subham-KRLX commented Mar 22, 2026

This PR restores the ElasticsearchTaskHandler in DEFAULT_LOGGING_CONFIG within airflow_local_settings.py, resolving the regression where task logs were no longer visible in stdout after upgrading to Airflow 3.While ElasticsearchRemoteLogIO
was previously added for remote retrieval, the handler itself was omitted from the configuration block. This caused Airflow to fall back to the generic FileTaskHandler, which does not support the write_stdout configuration. Restoring the handler ensures that logs are correctly sent to stdout(for Fluentd/container log shippers) when configured.

This aligns the Elasticsearch provider's logging configuration with the patterns used by Opensearch and Stackdriver.

closes: #63960
closes: #49863
closes: #54501

Was generative AI tooling used to co-author this PR?
Yes — Gemini (Code Research and PR Description)

@eladkal
Copy link
Contributor

eladkal commented Mar 22, 2026

Just to clarify - this PR solves #54501 and suppress #63960 ?

@eladkal eladkal added this to the Airflow 3.1.9 milestone Mar 22, 2026
@eladkal eladkal added the type:bug-fix Changelog: Bug Fixes label Mar 22, 2026
@eladkal
Copy link
Contributor

eladkal commented Mar 22, 2026

cc @Owen-CH-Leung for review as the expert :)

@eladkal eladkal added the backport-to-v3-1-test Mark PR with this label to backport to v3-1-test branch label Mar 22, 2026
@Subham-KRLX
Copy link
Contributor Author

Confirming that this PR correctly resolves the root cause for #49863, #54501, and #63960. By restoring the ElasticsearchTaskHandler in airflow_local_settings.py, we ensure that write_stdout is once again respected across all executors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:ConfigTemplates area:logging backport-to-v3-1-test Mark PR with this label to backport to v3-1-test branch type:bug-fix Changelog: Bug Fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[v3.0.4] Task logs are no longer visible in stdout only in files Celery executor does not log to stdout for Elasticsearch

2 participants