feat: 增加运行日志(不记录敏感信息) - 启动摘要:端口/间隔/重试/超时/并发/Telegram 状态/内置平台/账号数/数据库路径 - 检查结果:成功余额、认证失败禁用、失败原因 - 提醒状态机:触发提醒/余额恢复 - API 操作:登录、平台/账号增删改、设置修改、密码修改 - Telegram 发送成功、请求耗时(DEBUG) - 全部日志不含 apikey/token/密码
This commit is contained in:
@@ -52,8 +52,10 @@ def evaluate(account: dict, platform: dict, balance: float, cfg: Config) -> None
|
||||
below = balance < threshold
|
||||
if below and armed:
|
||||
kind = "below"
|
||||
logger.info("触发提醒: %s / %s 余额 %s < 阈值 %s(%s)", platform["name"], account["name"], _fmt(balance), _fmt(threshold), platform["currency"])
|
||||
elif not below and not armed:
|
||||
kind = "recovered"
|
||||
logger.info("余额恢复: %s / %s 余额 %s >= 阈值 %s(%s)", platform["name"], account["name"], _fmt(balance), _fmt(threshold), platform["currency"])
|
||||
else:
|
||||
return
|
||||
message = build_alert_message(kind, account, platform, balance)
|
||||
|
||||
Reference in New Issue
Block a user