Skip to content

Commit

Permalink
Remove duplicate logging initialization logic in utils.py
Browse files Browse the repository at this point in the history
  • Loading branch information
yfyeung authored May 6, 2024
1 parent c08fe48 commit 7889955
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions icefall/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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():
Expand Down

0 comments on commit 7889955

Please sign in to comment.