From 88165b3b60e0dffdb53e9c5ff99599bb34f86334 Mon Sep 17 00:00:00 2001 From: Collin McNulty Date: Wed, 30 Mar 2022 22:23:16 -0500 Subject: [PATCH] Do not log the hook connection details even at DEBUG level (#22627) --- airflow/hooks/base.py | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/airflow/hooks/base.py b/airflow/hooks/base.py index b3a46e27a8b14..aa506cf62de28 100644 --- a/airflow/hooks/base.py +++ b/airflow/hooks/base.py @@ -22,7 +22,6 @@ from airflow.typing_compat import Protocol from airflow.utils.log.logging_mixin import LoggingMixin -from airflow.utils.log.secrets_masker import redact if TYPE_CHECKING: from airflow.models.connection import Connection # Avoid circular imports. @@ -67,17 +66,6 @@ def get_connection(cls, conn_id: str) -> "Connection": conn = Connection.get_connection_from_secrets(conn_id) log.info("Using connection ID '%s' for task execution.", conn.conn_id) - log.debug( - "Connection details for '%s':: Host: %s, Port: %s, Schema: %s, Login: %s, Password: %s, " - "Extra: %s", - conn.conn_id, - conn.host, - conn.port, - conn.schema, - conn.login, - redact(conn.password), - redact(conn.extra_dejson), - ) return conn @classmethod