Skip to content

Add support for forwarding CeleryExecutor task logs to stdout#69597

Open
jayachandrakasarla wants to merge 3 commits into
apache:mainfrom
jayachandrakasarla:celery-task-logs-to-stdout
Open

Add support for forwarding CeleryExecutor task logs to stdout#69597
jayachandrakasarla wants to merge 3 commits into
apache:mainfrom
jayachandrakasarla:celery-task-logs-to-stdout

Conversation

@jayachandrakasarla

Copy link
Copy Markdown
Contributor

Closes #69554

Currently, CeleryExecutor task logs are not forwarded to stdout because this behavior is hardcoded to false in BaseExecutor.run_workload().

This PR allows users to enable log forwarding by setting AIRFLOW__CELERY__TASK_LOGS_TO_STDOUT=True. By default, this setting remains false to preserve the existing behavior. When enabled, task logs are forwarded to stdout, allowing container-level log collectors to capture them.

Below is a screenshot of the Celery worker logs showing the task's stdout output.
image

Was generative AI tooling used to co-author this PR?
  • Yes (Claude Sonnet 4.6)

@multimeric

Copy link
Copy Markdown

Note that this has been attempted before, so worth checking that your PR satisfies all the review here: #64481

@jayachandrakasarla
jayachandrakasarla force-pushed the celery-task-logs-to-stdout branch 2 times, most recently from 356a922 to 45d1584 Compare July 13, 2026 17:11
@jayachandrakasarla
jayachandrakasarla force-pushed the celery-task-logs-to-stdout branch from 44f9200 to f60d4b3 Compare July 17, 2026 07:44
@github-actions

github-actions Bot commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

uv.lock on main just moved via #70087 ("Add AWS services toolset for agents to access 1000+ APIs"), commit eddaa67 and this PR currently conflicts.

Quickest fix:

git fetch upstream main && git rebase upstream/main
rm uv.lock && uv lock
git add uv.lock && git rebase --continue
git push --force-with-lease

Automated nudge — ignore if you're not ready to rebase. This comment is updated in place on future uv.lock bumps.

@jayachandrakasarla
jayachandrakasarla force-pushed the celery-task-logs-to-stdout branch from 719b65c to 550b2d3 Compare July 20, 2026 07:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CeleryExecutor: no way to forward task logs to worker stdout (subprocess_logs_to_stdout hard-coded False)

2 participants