1
1
mirror of https://github.com/KenanZhu/AutoLibrary.git synced 2026-06-19 16:03: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
+8 -2
View File
@@ -125,9 +125,14 @@ class LibReserve(LibTimeSelector):
except ValueError as e:
self._showTrace(
f"预约信息错误 ! : {e}, "\
f"由于缺少必要的预约信息, 无法开始预约流程, 请检查预约信息是否完整",
f"由于缺少必要的预约信息, 无法开始预约流程",
self.TraceLevel.ERROR
)
self._showTrace(
f"预约信息错误 ! : {e}, "\
f"由于缺少必要的预约信息, 无法开始预约流程, 请检查预约信息是否完整",
no_log=True
)
return False
@@ -481,7 +486,8 @@ class LibReserve(LibTimeSelector):
seat_status = seat_link.get_attribute("title")
self._showTrace(f"座位 {seat_id} 选择成功 ! : 当前状态 - '{seat_status}'")
return True
self._showTrace(f"座位 {seat_id} 在该楼层区域中不存在, 请检查座位号是否正确", self.TraceLevel.WARNING)
self._showLog(f"座位 {seat_id} 在该楼层区域中不存在", self.TraceLevel.WARNING)
self._showTrace(f"座位 {seat_id} 在该楼层区域中不存在, 请检查座位号是否正确", no_log=True)
except:
self._showTrace(f"座位选择失败 !", self.TraceLevel.ERROR)
return False