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 2021/11/26 08:17:02 UTC

[GitHub] [airflow] uranusjr commented on a change in pull request #18896: Set default wasb Azure http logging level to warning; fixes #16224

uranusjr commented on a change in pull request #18896:
URL: https://github.com/apache/airflow/pull/18896#discussion_r757302248



##########
File path: airflow/providers/microsoft/azure/hooks/wasb.py
##########
@@ -110,6 +112,12 @@ def __init__(self, wasb_conn_id: str = default_conn_name, public_read: bool = Fa
         self.public_read = public_read
         self.connection = self.get_conn()
 
+        logger = logging.getLogger("azure.core.pipeline.policies.http_logging_policy")
+        try:
+            logger.setLevel(os.environ.get("AZURE_HTTP_LOGGING_LEVEL", logging.WARNING))

Review comment:
       Why?
   
   If this configurability is really desired, I’d use `airflow.settings` for this.
   
   ```python
   from airflow import settings
   
   logger.setLevel(getattr(settings, "AZURE_HTTP_LOGGING_LEVEL", logging.WARNING))
   ```
   
   So a user can add `AZURE_HTTP_LOGGING_LEVEL` to `airflow_local_settings` if they so desire. This will need an entry in documentation as well.
   
   With that, I won’t add the `ValueError` block. If the user provides something that crashes Airflow, that’s the user’s problem and we don’t need to do things too magically.




-- 
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