mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-09 18:00:33 +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
|
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 {
|
packetFactory?.run {
|
||||||
when (this) {
|
when (this) {
|
||||||
|
Loading…
Reference in New Issue
Block a user