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


##########
airflow/utils/serve_logs.py:
##########
@@ -44,28 +45,28 @@ def create_app():
     flask_app = Flask(__name__, static_folder=None)
     expiration_time_in_seconds = conf.getint("webserver", 
"log_request_clock_grace", fallback=30)
     log_directory = os.path.expanduser(conf.get("logging", "BASE_LOG_FOLDER"))
-    log_config_class = conf.get("logging", "logging_config_class")
+    log_config_class = configure_logging()
     if log_config_class is not None:
-        logger.info(f"Detected user-defined logging config. Attempting to load 
{log_config_class}")
+        logger.info("Detected user-defined logging config. Attempting to load 
%s", log_config_class)
         try:
-            import importlib
-
-            module_name, dict_name = log_config_class.split(".")
-            module = importlib.import_module(module_name)
-            logging_config = getattr(module, dict_name)
-            handler_config = logging_config.get("handlers", {})
-            task_config = handler_config.get("task", {})
-            base_log_folder = task_config.get("base_log_folder", None)
+            from airflow.utils.module_loading import import_string

Review Comment:
   Why is this import not at the top of the file?



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