amoghrajesh commented on code in PR #51082:
URL: https://github.com/apache/airflow/pull/51082#discussion_r2122805049
##########
task-sdk/src/airflow/sdk/log.py:
##########
@@ -252,22 +266,30 @@ def configure_logging(
output: BinaryIO | TextIO | None = None,
cache_logger_on_first_use: bool = True,
sending_to_supervisor: bool = False,
+ colored_console_log: bool | None = None,
):
"""Set up struct logging and stdlib logging config."""
if log_level == "DEFAULT":
log_level = "INFO"
- if "airflow.configuration" in sys.modules:
- from airflow.configuration import conf
+ from airflow.configuration import conf
+
+ log_level = conf.get("logging", "logging_level", fallback="INFO")
- log_level = conf.get("logging", "logging_level", fallback="INFO")
+ # If colored_console_log is not explicitly set, read from configuration
+ if colored_console_log is None:
+ from airflow.configuration import conf
Review Comment:
Non blocking comment, move the import up in the function to reuse
--
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]