Use TaskFormatter for Celery log formatting instead of default Formatter#61701
Merged
shahar1 merged 4 commits intoFeb 10, 2026
Merged
Conversation
shahar1
approved these changes
Feb 10, 2026
Contributor
There was a problem hiding this comment.
I'll reckon that logs with arbitrary question marks are better than a blocking error.
I'd rather include it in the upcoming release, and we could handle the question marks later.
@eladkal @amoghrajesh - WDYT?
amoghrajesh
reviewed
Feb 10, 2026
81 tasks
Alok-kumar-priyadarshi
pushed a commit
to Alok-kumar-priyadarshi/airflow
that referenced
this pull request
Feb 11, 2026
…ter (apache#61701) Co-authored-by: Shahar Epstein <60007259+shahar1@users.noreply.github.com>
Ratasa143
pushed a commit
to Ratasa143/airflow
that referenced
this pull request
Feb 15, 2026
…ter (apache#61701) Co-authored-by: Shahar Epstein <60007259+shahar1@users.noreply.github.com>
choo121600
pushed a commit
to choo121600/airflow
that referenced
this pull request
Feb 22, 2026
…ter (apache#61701) Co-authored-by: Shahar Epstein <60007259+shahar1@users.noreply.github.com>
AkshayArali
pushed a commit
to AkshayArali/airflow_630
that referenced
this pull request
Feb 27, 2026
…ter (apache#61701) Co-authored-by: Shahar Epstein <60007259+shahar1@users.noreply.github.com>
AkshayArali
pushed a commit
to AkshayArali/airflow_630
that referenced
this pull request
Feb 27, 2026
…ter (apache#61701) Co-authored-by: Shahar Epstein <60007259+shahar1@users.noreply.github.com>
Subham-KRLX
pushed a commit
to Subham-KRLX/airflow
that referenced
this pull request
Mar 4, 2026
…ter (apache#61701) Co-authored-by: Shahar Epstein <60007259+shahar1@users.noreply.github.com>
dominikhei
pushed a commit
to dominikhei/airflow
that referenced
this pull request
Mar 11, 2026
…ter (apache#61701) Co-authored-by: Shahar Epstein <60007259+shahar1@users.noreply.github.com>
Ankurdeewan
pushed a commit
to Ankurdeewan/airflow
that referenced
this pull request
Mar 15, 2026
…ter (apache#61701) Co-authored-by: Shahar Epstein <60007259+shahar1@users.noreply.github.com>
radhwene
pushed a commit
to radhwene/airflow
that referenced
this pull request
Mar 21, 2026
…ter (apache#61701) Co-authored-by: Shahar Epstein <60007259+shahar1@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
related: #49966
Why
When setting
AIRFLOW__LOGGING__CELERY_STDOUT_STDERR_SEPARATION=True, it will useDEFAULT_TASK_LOG_FMTas the log format.airflow/providers/celery/src/airflow/providers/celery/cli/celery_command.py
Lines 168 to 169 in 1aaa87b
However,
DEFAULT_TASK_LOG_FMTcontainstask_nameandtask_idwhich are not handled by the defaultlogging.Formatter.How
Use
TaskFormatterfrom Celery to handletask_nameandtask_id.Ref: https://github.com/celery/celery/blob/main/celery/app/log.py#L41-L42
What
Set
AIRFLOW__LOGGING__CELERY_STDOUT_STDERR_SEPARATION=True.Then start Airflow with:
breeze start-airflow --executor CeleryExecutor --integration celery.Was generative AI tooling used to co-author this PR?
{pr_number}.significant.rstor{issue_number}.significant.rst, in airflow-core/newsfragments.