Skip to content

Commit

Permalink
Do not log the hook connection details even at DEBUG level (apache#22627
Browse files Browse the repository at this point in the history
)
  • Loading branch information
collinmcnulty authored Mar 31, 2022
1 parent c25ee43 commit 88165b3
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions airflow/hooks/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 88165b3

Please sign in to comment.