Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure "airflow.task" logger used for TaskInstancePydantic and TaskInstance #37857

Merged
merged 1 commit into from
Mar 3, 2024

Commits on Mar 3, 2024

  1. Ensure the "airflow.task" logger used for TaskInstancePydantic and Ta…

    …skInstance
    
    Airflow TIs are assumed to log to the "airflow.task" logger.  TaskInstance was configuring this in the "reconstructor", a sqlalchemy thing that is processed on loading from DB.  But there's no equivalent for Pydantic models, and when running a task with TaskInstancePydantic, the wrong logger was used (fully qualified class name).  When looking for a solution, I saw that LoggingMixin will check `_logger_name` and if set will use it.  This works for the pydantic model and seems better for TI anyway so I updated both.
    dstandish committed Mar 3, 2024
    Configuration menu
    Copy the full SHA
    7ed6247 View commit details
    Browse the repository at this point in the history