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

Provide the logger_name param to base hook in order to override the logger name #36674

Merged
merged 1 commit into from Jan 9, 2024

Conversation

hussein-awala
Copy link
Member

The BaseHook accepts a parameter logger_name to override the logger_name in the LoggingMixin. Unfortunately, some of the hooks don't provide this parameter to the parent class, and the only way to override the logger name is doing it on an extra step and overriding a protected class attribute:

hook = SomeHook(...)
hook._logger_name = "<some name>"

@potiuk potiuk merged commit 8e8c080 into apache:main Jan 9, 2024
53 checks passed
@ephraimbuddy ephraimbuddy added this to the Airflow 2.8.1 milestone Jan 10, 2024
@ephraimbuddy ephraimbuddy added the type:misc/internal Changelog: Misc changes that should appear in change log label Jan 10, 2024
ephraimbuddy pushed a commit that referenced this pull request Jan 11, 2024
abhishekbhakat pushed a commit to abhishekbhakat/my_airflow that referenced this pull request Mar 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:core-operators Operators, Sensors and hooks within Core Airflow type:misc/internal Changelog: Misc changes that should appear in change log
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants