"Fix" a flaky test and cleanup an unused import.
[python_utils.git] / logging_utils.py
index de69046c30a82914b04e288982fcf93455fcb965..f7fac03cd913ef22106fbc25cea821e161e62187 100644 (file)
@@ -523,9 +523,8 @@ def initialize_logging(logger=None) -> logging.Logger:
         f'Initialized global logging; default logging level is {level_name}.'
     )
     if config.config['logging_clear_preexisting_handlers'] and preexisting_handlers_count > 0:
-        logger.warning(
-            'Logging cleared {preexisting_handlers_count} global handlers (--logging_clear_preexisting_handlers)'
-        )
+        msg = 'Logging cleared {preexisting_handlers_count} global handlers (--logging_clear_preexisting_handlers)'
+        logger.warning(msg)
     logger.debug(f'Logging format specification is "{fmt}"')
     if config.config['logging_debug_threads']:
         logger.debug('...Logging format spec captures tid/pid (--logging_debug_threads)')