2025-11-10 15:30:00 [__main__] [INFO] [wechat_auto_bot_env_v4.py:52] 正在初始化微信客户端...
初始化成功,获取到已登录窗口:微信
2025-11-10 15:30:00 [__main__] [INFO] [wechat_auto_bot_env_v4.py:54] 微信客户端初始化成功,当前登录:微信
2025-11-10 15:30:00 [__main__] [INFO] [wechat_auto_bot_env_v4.py:70] 成功加载config配置
2025-11-10 15:30:00 [__main__] [INFO] [wechat_auto_bot_env_v4.py:XXX] 定时任务调度器已启动
2025-11-10 15:30:00 [__main__] [INFO] [wechat_auto_bot_env_v4.py:XXX] 开始监听消息...
2025-11-10 15:30:00 [__main__] [INFO] [wechat_auto_bot_env_v4.py:459] ============================================================
2025-11-10 15:30:00 [__main__] [INFO] [wechat_auto_bot_env_v4.py:460] ⚡ 立即执行所有定时任务
2025-11-10 15:30:00 [__main__] [INFO] [wechat_auto_bot_env_v4.py:461] ============================================================
2025-11-10 15:30:00 [__main__] [INFO] [wechat_auto_bot_env_v4.py:465]
📅 【奇数日期任务组】
2025-11-10 15:30:00 [__main__] [INFO] [wechat_auto_bot_env_v4.py:469] 📤 执行任务1: message_sequences_A7_30 (奇数日 7:30)
2025-11-10 15:30:00 [__main__] [INFO] [wechat_auto_bot_env_v4.py:342] 开始执行消息序列,当前时间:2025-11-10 15:30:00
2025-11-10 15:30:00 [__main__] [INFO] [wechat_auto_bot_env_v4.py:345] 正在处理聊天室: 🏥◼️膏方河北2名医交流群
2025-11-10 15:30:02 [__main__] [INFO] [wechat_auto_bot_env_v4.py:350] ✅ 已切换到聊天室: 🏥◼️膏方河北2名医交流群
2025-11-10 15:30:04 [__main__] [INFO] [wechat_auto_bot_env_v4.py:232] ✅ 成功发送文本消息
2025-11-10 15:30:06 [__main__] [INFO] [wechat_auto_bot_env_v4.py:249] ✅ 成功发送图片 gf7-1.jpg
2025-11-10 15:30:08 [__main__] [INFO] [wechat_auto_bot_env_v4.py:249] ✅ 成功发送图片 gf7-2.jpg
2025-11-10 15:30:10 [__main__] [INFO] [wechat_auto_bot_env_v4.py:249] ✅ 成功发送图片 gfA7-3.jpg
2025-11-10 15:30:12 [__main__] [INFO] [wechat_auto_bot_env_v4.py:249] ✅ 成功发送图片 gfA7-4.jpg
2025-11-10 15:30:12 [__main__] [INFO] [wechat_auto_bot_env_v4.py:369] 当前消息序列发送完成
2025-11-10 15:30:12 [__main__] [INFO] [wechat_auto_bot_env_v4.py:474] 📤 执行任务2: message_sequences_A12_30 (奇数日 12:30)
2025-11-10 15:30:12 [__main__] [INFO] [wechat_auto_bot_env_v4.py:342] 开始执行消息序列,当前时间:2025-11-10 15:30:12
2025-11-10 15:30:12 [__main__] [INFO] [wechat_auto_bot_env_v4.py:345] 正在处理聊天室: 🏥◼️膏方河北2名医交流群
2025-11-10 15:30:14 [__main__] [INFO] [wechat_auto_bot_env_v4.py:350] ✅ 已切换到聊天室: 🏥◼️膏方河北2名医交流群
2025-11-10 15:30:16 [__main__] [INFO] [wechat_auto_bot_env_v4.py:232] ✅ 成功发送文本消息
2025-11-10 15:30:18 [__main__] [INFO] [wechat_auto_bot_env_v4.py:249] ✅ 成功发送图片 gfA12-1.jpg
2025-11-10 15:30:20 [__main__] [INFO] [wechat_auto_bot_env_v4.py:249] ✅ 成功发送图片 gfA12-2.jpg
2025-11-10 15:30:20 [__main__] [INFO] [wechat_auto_bot_env_v4.py:369] 当前消息序列发送完成
... (其他任务类似)
2025-11-10 15:30:45 [__main__] [INFO] [wechat_auto_bot_env_v4.py:514] ============================================================
2025-11-10 15:30:45 [__main__] [INFO] [wechat_auto_bot_env_v4.py:515] ✅ 所有定时任务执行完成
2025-11-10 15:30:45 [__main__] [INFO] [wechat_auto_bot_env_v4.py:516] ============================================================
2025-11-10 07:30:00 [__main__] [INFO] [wechat_auto_bot_env_v4.py:342] 开始执行消息序列,当前时间:2025-11-10 07:30:00
2025-11-10 07:30:00 [__main__] [INFO] [wechat_auto_bot_env_v4.py:345] 正在处理聊天室: 🏥◼️膏方河北2名医交流群
2025-11-10 07:30:02 [__main__] [INFO] [wechat_auto_bot_env_v4.py:350] ✅ 已切换到聊天室: 🏥◼️膏方河北2名医交流群
2025-11-10 07:30:04 [__main__] [INFO] [wechat_auto_bot_env_v4.py:232] ✅ 成功发送文本消息
2025-11-10 07:30:06 [__main__] [INFO] [wechat_auto_bot_env_v4.py:249] ✅ 成功发送图片 gf7-1.jpg
2025-11-10 07:30:08 [__main__] [INFO] [wechat_auto_bot_env_v4.py:249] ✅ 成功发送图片 gf7-2.jpg
2025-11-10 07:30:10 [__main__] [INFO] [wechat_auto_bot_env_v4.py:249] ✅ 成功发送图片 gfA7-3.jpg
2025-11-10 07:30:12 [__main__] [INFO] [wechat_auto_bot_env_v4.py:249] ✅ 成功发送图片 gfA7-4.jpg
2025-11-10 07:30:12 [__main__] [INFO] [wechat_auto_bot_env_v4.py:369] 当前消息序列发送完成
2025-11-10 10:15:30 [__main__] [INFO] [wechat_auto_bot_env_v4.py:XXX] [收到消息] 来自 🏥◼️膏方河北2名医交流群, 发送者: unknown, 类型: 文本, 内容: 请问这个产品怎么购买?
2025-11-10 10:15:31 [__main__] [INFO] [wechat_auto_bot_env_v4.py:XXX] [自动回复] 匹配关键词: ['购买'], 回复到: 🏥◼️膏方河北2名医交流群
2025-11-10 10:15:32 [__main__] [INFO] [wechat_auto_bot_env_v4.py:232] ✅ 成功发送文本消息
2025-11-10 10:20:15 [__main__] [INFO] [wechat_auto_bot_env_v4.py:XXX] [消息转发] 从 源群 转发到 目标群
2025-11-10 10:20:16 [__main__] [INFO] [wechat_auto_bot_env_v4.py:XXX] [消息转发] ✅ 文本转发成功
2025-11-10 15:30:04 [__main__] [DEBUG] [wechat_auto_bot_env_v4.py:261] 🔄 消息发送重试 (尝试 1/3): SendMsg返回False
2025-11-10 15:30:06 [__main__] [INFO] [wechat_auto_bot_env_v4.py:232] ✅ 成功发送文本消息
2025-11-10 15:30:00 [__main__] [INFO] [wechat_auto_bot_env_v4.py:470] ⏭️ 跳过任务1: message_sequences_A7_30 为空
2025-11-10 15:30:00 [__main__] [ERROR] [wechat_auto_bot_env_v4.py:353] ❌ 切换聊天室失败: 不存在的群名称, 错误: 未找到匹配的聊天
2025-11-10 15:30:06 [__main__] [ERROR] [wechat_auto_bot_env_v4.py:243] ❌ 图片文件不存在: D:\develop\python\小龙\wxauto-bot-v4\wxauto文件\missing.jpg
2025-11-10 15:30:08 [__main__] [ERROR] [wechat_auto_bot_env_v4.py:264] ❌ 消息发送失败,已达到最大重试次数: text, 消息内容
错误信息: 'str' object has no attribute 'SendMsg'
2025-11-10 15:30:10 [__main__] [ERROR] [wechat_auto_bot_env_v4.py:519] ❌ 执行定时任务失败: name 'message_sequences_A7_30' is not defined
Traceback (most recent call last):
File "wechat_auto_bot_env_v4.py", line 468, in execute_all_scheduled_tasks
self.send_sequence(self.message_sequences_A7_30)
NameError: name 'message_sequences_A7_30' is not defined
2025-11-10 15:30:45 [__main__] [INFO] [wechat_auto_bot_env_v4.py:511] 🏥 执行任务7: 健康检查
2025-11-10 15:30:45 [__main__] [INFO] [wechat_auto_bot_env_v4.py:XXX] 执行健康检查...
2025-11-10 15:30:45 [__main__] [INFO] [wechat_auto_bot_env_v4.py:XXX] ✅ 健康检查通过
任务:message_sequences_A7_30
- 切换窗口:2秒
- 发送1文本 + 4图片:约10秒
- 总耗时:约12秒
所有6个任务执行完成
- 奇数日期任务(3个):约36秒
- 偶数日期任务(3个):约38秒
- 健康检查:<1秒
- 总耗时:约75秒
| 级别 | 用途 | 示例 |
|---|---|---|
| DEBUG | 调试信息,重试详情 | 消息发送重试 |
| INFO | 正常运行信息 | 消息发送成功 |
| WARNING | 警告信息 | - |
| ERROR | 错误信息 | 发送失败、文件不存在 |
成功消息数 / 总消息数 × 100%
示例:30条成功 / 30条总数 = 100%
总耗时 / 消息数
示例:75秒 / 30条消息 = 2.5秒/条
查找ERROR日志,统计:
- 切换窗口失败次数
- 图片文件缺失次数
- 发送失败次数
- 其他异常
# 查看最新100行
Get-Content logs\wechat_bot_20251110.log -Tail 100
# 实时监控
Get-Content logs\wechat_bot_20251110.log -Wait -Tail 50
# 搜索ERROR
Select-String -Path logs\wechat_bot_20251110.log -Pattern "ERROR"
# 统计成功消息数
(Select-String -Path logs\wechat_bot_20251110.log -Pattern "✅ 成功发送").Count# 只看INFO
Select-String -Path logs\wechat_bot_20251110.log -Pattern "\[INFO\]"
# 只看ERROR
Select-String -Path logs\wechat_bot_20251110.log -Pattern "\[ERROR\]"
# 只看特定群
Select-String -Path logs\wechat_bot_20251110.log -Pattern "膏方河北"日志文件位置:logs/wechat_bot_YYYYMMDD.log
日志格式:时间 [模块] [级别] [文件:行号] 消息内容