Commit f6ab87f1 authored by Him188's avatar Him188

Unified `bot.logger` and `network.logger`

parent c20040f1
......@@ -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) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment