uranusjr commented on code in PR #51082:
URL: https://github.com/apache/airflow/pull/51082#discussion_r2122781492
##########
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
Review Comment:
This import can be moved to the beginning of the function and only done
once. (No functionality difference, but it reads better than being inside an
`if`.)
##########
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
Review Comment:
This import can be moved to the beginning of the function and only done
once. (No functionality difference, but it reads better than being inside an
`if`.)
--
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]