From 4e97b19b6355a4c3afb50f9270f74d96b7988f42 Mon Sep 17 00:00:00 2001 From: Yifan Yang <64255737+yfyeung@users.noreply.github.com> Date: Mon, 6 May 2024 13:00:27 +0800 Subject: [PATCH] Remove duplicate logging initialization logic in utils.py (#1617) --- icefall/utils.py | 9 --------- 1 file changed, 9 deletions(-) diff --git a/icefall/utils.py b/icefall/utils.py index 57467cb561..0c509fc174 100644 --- a/icefall/utils.py +++ b/icefall/utils.py @@ -110,13 +110,6 @@ def str2bool(v): raise argparse.ArgumentTypeError("Boolean value expected.") -def clear_log_handlers(): - logger = logging.getLogger() - handlers = logger.handlers[:] - for handler in handlers: - logger.removeHandler(handler) - - def setup_logger( log_filename: Pathlike, log_level: str = "info", @@ -133,8 +126,6 @@ def setup_logger( use_console: True to also print logs to console. """ - clear_log_handlers() - now = datetime.now() date_time = now.strftime("%Y-%m-%d-%H-%M-%S") if dist.is_available() and dist.is_initialized():