mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-08 09:10:11 +08:00
Unified bot.logger
and network.logger
This commit is contained in:
parent
c20040f1ac
commit
f6ab87f1ef
@ -404,7 +404,14 @@ internal class QQAndroidBotNetworkHandler(bot: QQAndroidBot) : BotNetworkHandler
|
||||
if (packet is CancellableEvent && packet.isCancelled) return
|
||||
}
|
||||
|
||||
logger.info("Received: ${packet.toString().replace("\n", """\n""").replace("\r", "")}")
|
||||
if (bot.logger.isEnabled || logger.isEnabled) {
|
||||
val logMessage = "Received: ${packet.toString().replace("\n", """\n""").replace("\r", "")}"
|
||||
|
||||
if (packet is Event) {
|
||||
bot.logger.verbose(logMessage)
|
||||
}
|
||||
logger.verbose(logMessage)
|
||||
}
|
||||
|
||||
packetFactory?.run {
|
||||
when (this) {
|
||||
|
Loading…
Reference in New Issue
Block a user