Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove duplicate logging initialization logic in utils.py #1617

Merged
merged 1 commit into from
May 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading