1
1
mirror of https://github.com/KenanZhu/AutoLibrary.git synced 2026-06-21 08:53:02 +08:00

feat(MsgBase, gui, operators): 增强日志输出功能

- 为 _showTrace 方法添加 no_log 参数,支持控制日志写入
- 在主窗口各关键操作点添加日志输出
- 优化错误信息输出策略,分离 trace 和 log 输出
- 改进配置目录初始化过程的日志记录
This commit is contained in:
2026-03-18 12:46:37 +08:00
parent e481824344
commit 02463f087e
10 changed files with 94 additions and 38 deletions
+3 -2
View File
@@ -61,7 +61,7 @@ class LibRenew(LibTimeSelector):
result_message = result_message.text.strip()
self._showTrace(f"\n"\
f" 续约失败 !\n"\
f" {result_message}")
f" {result_message}", no_log=True)
return False
try:
WebDriverWait(self.__driver, 2).until(
@@ -186,7 +186,8 @@ class LibRenew(LibTimeSelector):
self._showTrace(f"用户 {username} 续约界面加载失败 !", self.TraceLevel.ERROR)
return False
if "disabled" in renew_btn.get_attribute("class"):
self._showTrace(f"用户 {username} 续约按钮不可用, 可能不在场馆内, 请连接图书馆网络后重试")
self._showLog(f"用户 {username} 续约按钮不可用, 可能不在场馆内")
self._showTrace(f"用户 {username} 续约按钮不可用, 可能不在场馆内, 请连接图书馆网络后重试", no_log=True)
return False
renew_btn.click()
if not self.__waitRenewDialog():