Commit 32c15a47 authored by Him188's avatar Him188

Remove debugPrintln

parent 8a4750ba
...@@ -124,7 +124,7 @@ fun ByteReadPacket.decodeMultiClientToServerPackets() { ...@@ -124,7 +124,7 @@ fun ByteReadPacket.decodeMultiClientToServerPackets() {
} }
fun Map<Int, ByteArray>.printTLVMap(name: String = "", keyLength: Int = 2) = fun Map<Int, ByteArray>.printTLVMap(name: String = "", keyLength: Int = 2) =
debugPrintln("TLVMap $name= " + this.mapValues { (_, value) -> value.toUHexString() }.mapKeys { DebugLogger.debug("TLVMap $name= " + this.mapValues { (_, value) -> value.toUHexString() }.mapKeys {
when (keyLength) { when (keyLength) {
1 -> it.key.toUByte().contentToString() 1 -> it.key.toUByte().contentToString()
2 -> it.key.toUShort().contentToString() 2 -> it.key.toUShort().contentToString()
......
...@@ -15,11 +15,13 @@ package net.mamoe.mirai.utils.io ...@@ -15,11 +15,13 @@ package net.mamoe.mirai.utils.io
import kotlinx.io.core.* import kotlinx.io.core.*
import kotlinx.io.pool.useInstance import kotlinx.io.pool.useInstance
import net.mamoe.mirai.utils.* import net.mamoe.mirai.utils.DefaultLogger
import net.mamoe.mirai.utils.MiraiDebugAPI
import net.mamoe.mirai.utils.MiraiLoggerWithSwitch
import net.mamoe.mirai.utils.withSwitch
import kotlin.contracts.ExperimentalContracts import kotlin.contracts.ExperimentalContracts
import kotlin.contracts.InvocationKind import kotlin.contracts.InvocationKind
import kotlin.contracts.contract import kotlin.contracts.contract
import kotlin.js.JsName
import kotlin.jvm.JvmMultifileClass import kotlin.jvm.JvmMultifileClass
import kotlin.jvm.JvmName import kotlin.jvm.JvmName
...@@ -30,9 +32,6 @@ val DebugLogger : MiraiLoggerWithSwitch = DefaultLogger("Packet Debug").withSwit ...@@ -30,9 +32,6 @@ val DebugLogger : MiraiLoggerWithSwitch = DefaultLogger("Packet Debug").withSwit
@MiraiDebugAPI("Unstable") @MiraiDebugAPI("Unstable")
inline fun Throwable.logStacktrace(message: String? = null) = DebugLogger.error(message, this) inline fun Throwable.logStacktrace(message: String? = null) = DebugLogger.error(message, this)
@MiraiDebugAPI("Low efficiency.")
inline fun debugPrintln(any: Any?) = DebugLogger.debug(any)
@MiraiDebugAPI("Low efficiency.") @MiraiDebugAPI("Low efficiency.")
inline fun String.debugPrintThis(name: String): String { inline fun String.debugPrintThis(name: String): String {
DebugLogger.debug("$name=$this") DebugLogger.debug("$name=$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