From c78c8ac46c731d9777eb3cedda5eb30d79d5f0f6 Mon Sep 17 00:00:00 2001 From: Him188 Date: Sat, 7 Dec 2019 00:51:38 +0800 Subject: [PATCH] Add a switch to DebugLogger --- .../commonMain/kotlin/net.mamoe.mirai/utils/io/DebugUtil.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/utils/io/DebugUtil.kt b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/utils/io/DebugUtil.kt index 73492a8d2..253c2c8dc 100644 --- a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/utils/io/DebugUtil.kt +++ b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/utils/io/DebugUtil.kt @@ -6,9 +6,10 @@ import net.mamoe.mirai.utils.MiraiInternalAPI import net.mamoe.mirai.utils.MiraiLogger import net.mamoe.mirai.utils.internal.printColorize import net.mamoe.mirai.utils.internal.printCompareHex +import net.mamoe.mirai.utils.withSwitch -internal object DebugLogger : MiraiLogger by DefaultLogger("Packet Debug") +internal object DebugLogger : MiraiLogger by DefaultLogger("Packet Debug").withSwitch() internal fun Throwable.logStacktrace(message: String? = null) = DebugLogger.error(message, this)