From f52d342afb88c660284b2ba8fa298f1fbef2bee0 Mon Sep 17 00:00:00 2001 From: Wenjie Zhang Date: Mon, 3 Mar 2025 22:06:28 +0800 Subject: [PATCH] update logger config --- src/routers/chat_router.py | 1 - src/utils/logging_config.py | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/routers/chat_router.py b/src/routers/chat_router.py index 07dda597..78a8ab70 100644 --- a/src/routers/chat_router.py +++ b/src/routers/chat_router.py @@ -57,7 +57,6 @@ def chat_post( messages = history_manager.get_history_with_msg(modified_query, max_rounds=meta.get('history_round')) history_manager.add_user(query) # 注意这里使用原始查询 - logger.debug(f"Web history: {history_manager.messages}") content = "" reasoning_content = "" diff --git a/src/utils/logging_config.py b/src/utils/logging_config.py index efec117d..5a89ff68 100644 --- a/src/utils/logging_config.py +++ b/src/utils/logging_config.py @@ -7,7 +7,7 @@ DATETIME = datetime.now().strftime('%Y-%m-%d-%H%M%S') # DATETIME = "debug" # 为了方便,调试的时候输出到 debug.log 文件 LOG_FILE = f'saves/log/project-{DATETIME}.log' -def setup_logger(name, level=logging.DEBUG, console=False): +def setup_logger(name, level=logging.DEBUG, console=True): os.makedirs("saves/log", exist_ok=True) """Function to setup logger with the given name and log file."""