mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-31 11:30:16 +08:00
Reduce unnecessary logs from packetLogger
This commit is contained in:
parent
a4e7fda416
commit
2dcff0cf45
@ -195,7 +195,9 @@ internal class PacketCodecImpl : PacketCodec {
|
||||
|
||||
if (PacketLogger.isEnabled) {
|
||||
val extraData = readBytes(readInt() - 4)
|
||||
PacketLogger.verbose { "(sso/inner)extraData = ${extraData.toUHexString()}" }
|
||||
if (extraData.isNotEmpty()) {
|
||||
PacketLogger.verbose { "(sso/inner)extraData = ${extraData.toUHexString()}" }
|
||||
}
|
||||
} else {
|
||||
discardExact(readInt() - 4)
|
||||
}
|
||||
|
@ -110,7 +110,6 @@ internal open class NettyNetworkHandler(
|
||||
|
||||
private inner class OutgoingPacketEncoder : MessageToByteEncoder<OutgoingPacket>(OutgoingPacket::class.java) {
|
||||
override fun encode(ctx: ChannelHandlerContext, msg: OutgoingPacket, out: ByteBuf) {
|
||||
packetLogger.debug { "encode: ${msg.displayName}" }
|
||||
out.writeBytes(msg.delegate)
|
||||
}
|
||||
}
|
||||
@ -187,7 +186,6 @@ internal open class NettyNetworkHandler(
|
||||
|
||||
fun send(raw: RawIncomingPacket) {
|
||||
launch {
|
||||
packetLogger.debug { "Packet Handling Processor: receive packet ${raw.commandName}" }
|
||||
val result = packetCodec.processBody(context.bot, raw)
|
||||
if (result == null) {
|
||||
collectUnknownPacket(raw)
|
||||
|
Loading…
Reference in New Issue
Block a user