uranusjr commented on code in PR #31512:
URL: https://github.com/apache/airflow/pull/31512#discussion_r1205118205


##########
airflow/config_templates/airflow_local_settings.py:
##########
@@ -282,6 +283,18 @@
             },
         }
         DEFAULT_LOGGING_CONFIG["handlers"].update(OSS_REMOTE_HANDLERS)
+    elif REMOTE_BASE_LOG_FOLDER.startswith("hdfs://"):
+        HDFS_REMOTE_HANDLERS: dict[str, dict[str, str | None]] = {
+            "task": {
+                "class": 
"airflow.providers.apache.hdfs.log.hdfs_task_handler.HdfsTaskHandler",
+                "formatter": "airflow",
+                "base_log_folder": str(os.path.expanduser(BASE_LOG_FOLDER)),
+                "s3_log_folder": REMOTE_BASE_LOG_FOLDER,
+                "filename_template": FILENAME_TEMPLATE,
+            },
+        }
+
+        DEFAULT_LOGGING_CONFIG["handlers"].update(HDFS_REMOTE_HANDLERS)

Review Comment:
   ```suggestion
           HDFS_REMOTE_HANDLERS: dict[str, dict[str, str | None]] = {
               "task": {
                   "class": 
"airflow.providers.apache.hdfs.log.hdfs_task_handler.HdfsTaskHandler",
                   "formatter": "airflow",
                   "base_log_folder": os.path.expanduser(BASE_LOG_FOLDER),
                   "s3_log_folder": REMOTE_BASE_LOG_FOLDER,
                   "filename_template": FILENAME_TEMPLATE,
               },
           }
           DEFAULT_LOGGING_CONFIG["handlers"].update(HDFS_REMOTE_HANDLERS)
   ```



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to