From 671ab648fe792b01659ce1bc32f1523ab923b2e3 Mon Sep 17 00:00:00 2001 From: Chessing234 Date: Wed, 27 May 2026 21:46:32 +0530 Subject: [PATCH] Fix bug where info logs are displayed as ERROR by removing stderr redirection --- fastchat/utils.py | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/fastchat/utils.py b/fastchat/utils.py index d3531928f..9445db7f6 100644 --- a/fastchat/utils.py +++ b/fastchat/utils.py @@ -45,16 +45,6 @@ def build_logger(logger_name, logger_filename): logging.basicConfig(level=logging.INFO) logging.getLogger().handlers[0].setFormatter(formatter) - # Redirect stdout and stderr to loggers - stdout_logger = logging.getLogger("stdout") - stdout_logger.setLevel(logging.INFO) - sl = StreamToLogger(stdout_logger, logging.INFO) - sys.stdout = sl - - stderr_logger = logging.getLogger("stderr") - stderr_logger.setLevel(logging.ERROR) - sl = StreamToLogger(stderr_logger, logging.ERROR) - sys.stderr = sl # Get logger logger = logging.getLogger(logger_name)