fix: disable correct loggers

This commit is contained in:
oSumAtrIX 2023-08-12 02:22:52 +02:00
parent 02d6ff15fe
commit c2d89c622e
No known key found for this signature in database
GPG key ID: A9B3094ACDB604B4

View file

@ -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))