feat: 添加 WebSocket 日志推送功能,支持实时日志监控和历史日志加载

This commit is contained in:
墨梓柒
2025-11-18 00:38:30 +08:00
parent b0eb77e68e
commit 43e0c9a4ad
6 changed files with 257 additions and 1 deletions

4
bot.py
View File

@@ -212,6 +212,10 @@ if __name__ == "__main__":
# 创建事件循环
loop = asyncio.new_event_loop()
asyncio.set_event_loop(loop)
# 初始化 WebSocket 日志推送
from src.common.logger import initialize_ws_handler
initialize_ws_handler(loop)
try:
# 执行初始化和任务调度