Skip to content

Commit

Permalink
Remove duplicate logging initialization logic in utils.py (k2-fsa#1617)
Browse files Browse the repository at this point in the history
  • Loading branch information
yfyeung authored and Your Name committed Aug 9, 2024
1 parent 322baa2 commit 8041ae7
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 8041ae7

Please sign in to comment.