We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
// 设置工作目录 File workingDir = new File("mirai/"); workingDir.mkdir(); BotConfiguration botConfiguration = new BotConfiguration() {{ setWorkingDir(workingDir); setProtocol(MiraiProtocol.ANDROID_WATCH); // 重定向日志 redirectBotLogToDirectory(); redirectNetworkLogToDirectory(); }};
日志文件中,日志类别都变成了Net
Net
这是开启重定向和注释掉重定向的两行代码之后的区别:
BotConfiguration设置:
redirectBotLogToDirectory(); redirectNetworkLogToDirectory();
2.8.2
ANDROID_WATCH
无
开启日志重定向到目录: �[92m2021-12-16 13:24:04 I/Net BotQQ号: Bot login successful.�[0m �[0m2021-12-16 13:24:04 V/Net BotQQ号: Send: MessageSvc.PbSendMsg(MessageSvc.PbSendMsg)�[0m �[0m2021-12-16 13:24:04 V/Net BotQQ号: Friend(QQ大号) <- 登录成功2,好友消息�[0m �[0m2021-12-16 13:24:04 V/Net BotQQ号: Recv: MessageSvc.PbSendMsg�[0m �[0m2021-12-16 13:24:04 V/Net BotQQ号: Send: StatSvc.register(offline)�[0m �[92m2021-12-16 13:24:04 I/Net BotQQ号: Bot cancelled: Job was cancelled�[0m
不开重定向:
2021-12-16 13:25:17 I/Bot BotQQ号: Bot login successful. 2021-12-16 13:25:17 V/Net BotQQ号: Send: MessageSvc.PbSendMsg(MessageSvc.PbSendMsg) 2021-12-16 13:25:17 V/Bot BotQQ号: Friend(QQ大号) <- 登录成功2,好友消息 2021-12-16 13:25:17 V/Net BotQQ号: Recv: MessageSvc.PbSendMsg 2021-12-16 13:25:17 V/Net BotQQ号: Send: StatSvc.register(offline) 2021-12-16 13:25:17 I/Bot BotQQ号: Bot cancelled: Job was cancelled
### 网络日志 ```text 1
No response
The text was updated successfully, but these errors were encountered:
chore(typo): fix mamoe#1743
b372b4e
修复设置 redirectNetworkLogToDirectory 后日志 identity 为 Bot 的问题 fix #1743 (#…
53883e8
…1751)
Successfully merging a pull request may close this issue.
问题描述
日志文件中,日志类别都变成了
Net
这是开启重定向和注释掉重定向的两行代码之后的区别:
复现
BotConfiguration设置:
mirai-core 版本
2.8.2
bot-protocol
ANDROID_WATCH
其他组件版本
无
系统日志
不开重定向:
补充信息
No response
The text was updated successfully, but these errors were encountered: