From c2d89c622e06e58e5042e1a00ef67cee8a246e53 Mon Sep 17 00:00:00 2001 From: oSumAtrIX Date: Sat, 12 Aug 2023 02:22:52 +0200 Subject: [PATCH] fix: disable correct loggers --- src/main/kotlin/app/revanced/patcher/Patcher.kt | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/main/kotlin/app/revanced/patcher/Patcher.kt b/src/main/kotlin/app/revanced/patcher/Patcher.kt index 1f6de0c..a41941f 100644 --- a/src/main/kotlin/app/revanced/patcher/Patcher.kt +++ b/src/main/kotlin/app/revanced/patcher/Patcher.kt @@ -54,13 +54,21 @@ class Patcher(private val options: PatcherOptions) { } init { - LogManager.getLogManager().getLogger("brut.*").useParentHandlers = false + // Disable unwanted logging. + LogManager.getLogManager().let { + listOf("app.revanced.apktool-lib", "app.revanced.brut.*").forEach { loggerName -> + it.getLogger(loggerName)?.useParentHandlers = false + } + } logger.info("Reading dex files") + // read dex files val dexFile = MultiDexIO.readDexFile(true, options.inputFile, NAMER, null, null) + // get the opcodes opcodes = dexFile.opcodes + // finally create patcher context context = PatcherContext(dexFile.classes.toMutableList(), File(options.resourceCacheDirectory))