@@ -83,11 +83,6 @@ def initialize_global_loggers():
83
83
"""
84
84
Initializes the global loggers to the default configuration.
85
85
"""
86
- # Use Rich logging while running in the local execution
87
- if os .environ .get ("FLYTE_INTERNAL_EXECUTION_ID" , None ) is None :
88
- upgrade_to_rich_logging ()
89
- return
90
-
91
86
handler = logging .StreamHandler ()
92
87
handler .setLevel (logging .DEBUG )
93
88
formatter = logging .Formatter (fmt = "[%(name)s] %(message)s" )
@@ -98,6 +93,10 @@ def initialize_global_loggers():
98
93
set_flytekit_log_properties (handler , None , _get_env_logging_level ())
99
94
set_user_logger_properties (handler , None , logging .INFO )
100
95
96
+ # Use Rich logging while running in the local execution
97
+ if os .environ .get ("FLYTE_INTERNAL_EXECUTION_ID" , None ) is None or interactive .ipython_check ():
98
+ upgrade_to_rich_logging ()
99
+
101
100
102
101
def is_rich_logging_enabled () -> bool :
103
102
return os .environ .get (LOGGING_RICH_FMT_ENV_VAR ) != "0"
@@ -146,8 +145,5 @@ def get_level_from_cli_verbosity(verbosity: int) -> int:
146
145
return logging .DEBUG
147
146
148
147
149
- if interactive .ipython_check ():
150
- upgrade_to_rich_logging ()
151
- else :
152
- # Default initialization
153
- initialize_global_loggers ()
148
+ # Default initialization
149
+ initialize_global_loggers ()
0 commit comments