You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/06/21 15:29:19 UTC

[GitHub] [airflow] potiuk commented on a diff in pull request #24570: Add parameter to turn off SQL query logging

potiuk commented on code in PR #24570:
URL: https://github.com/apache/airflow/pull/24570#discussion_r902767280


##########
airflow/hooks/dbapi.py:
##########
@@ -84,6 +84,7 @@ def __init__(self, *args, schema: Optional[str] = None, **kwargs):
         # from kwargs and store it on its own. We do not run "pop" here as we want to give the
         # Hook deriving from the DBApiHook to still have access to the field in it's constructor
         self.__schema = schema
+        self.log_sql = kwargs.get('log_sql', True)

Review Comment:
   Why not default log_sql parameter in constructor - that would also allow you to add docstring.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org