1
mirror of https://github.com/revanced/revanced-cli synced 2025-11-19 15:33:27 +01:00

Compare commits

...

2 Commits

Author SHA1 Message Date
semantic-release-bot
ea7efd2afc chore(release): 1.9.0 [skip ci]
# [1.9.0](https://github.com/revanced/revanced-cli/compare/v1.8.0...v1.9.0) (2022-06-22)

### Features

* migrate logger to `slf4j` ([6c4c192](6c4c1924ee))
2022-06-22 12:20:50 +00:00
oSumAtrIX
6c4c1924ee feat: migrate logger to slf4j 2022-06-22 14:19:06 +02:00
5 changed files with 14 additions and 7 deletions

View File

@@ -1,3 +1,10 @@
# [1.9.0](https://github.com/revanced/revanced-cli/compare/v1.8.0...v1.9.0) (2022-06-22)
### Features
* migrate logger to `slf4j` ([6c4c192](https://github.com/revanced/revanced-cli/commit/6c4c1924ee9ae75af3449749a6a82b7ae5572129))
# [1.8.0](https://github.com/revanced/revanced-cli/compare/v1.7.1...v1.8.0) (2022-06-22)

View File

@@ -33,6 +33,7 @@ dependencies {
implementation(kotlin("reflect"))
implementation("app.revanced:revanced-patcher:1.6.0")
implementation("org.slf4j:slf4j-api:1.7.36")
implementation("info.picocli:picocli:4.6.3")
implementation("com.android.tools.build:apksig:7.2.1")
implementation("com.github.revanced:jadb:master-SNAPSHOT") // updated fork

View File

@@ -1,2 +1,2 @@
kotlin.code.style = official
version = 1.8.0
version = 1.9.0

View File

@@ -8,10 +8,11 @@ import app.revanced.patcher.extensions.PatchExtensions.description
import app.revanced.patcher.extensions.PatchExtensions.patchName
import app.revanced.patcher.util.patch.implementation.JarPatchBundle
import app.revanced.utils.adb.Adb
import org.slf4j.Logger
import org.slf4j.LoggerFactory
import picocli.CommandLine.*
import java.io.File
import java.nio.file.Files
import java.util.logging.Logger
import kotlin.io.path.Path
import kotlin.io.path.name
@@ -19,7 +20,7 @@ import kotlin.io.path.name
name = "ReVanced-CLI", version = ["1.0.0"], mixinStandardHelpOptions = true
)
internal object MainCommand : Runnable {
val logger: Logger = Logger.getLogger(MainCommand.javaClass.name)
val logger: Logger = LoggerFactory.getLogger(MainCommand::class.java)
@ArgGroup(exclusive = false, multiplicity = "1")
lateinit var args: Args
@@ -85,8 +86,6 @@ internal object MainCommand : Runnable {
}
override fun run() {
System.setProperty("java.util.logging.SimpleFormatter.format", "%4\$s: %5\$s %n")
if (args.lArgs?.listOnly == true) {
for (patchBundlePath in args.patchBundles) for (patch in JarPatchBundle(patchBundlePath).loadPatches()) {
logger.info("${patch.patchName}: ${patch.description}")

View File

@@ -35,7 +35,7 @@ fun Patcher.addPatchesFiltered(
return@patch
}
if (compatiblePackages == null) logger.warning("$prefix: Missing compatibility annotation. Continuing.")
if (compatiblePackages == null) logger.warn("$prefix: Missing compatibility annotation. Continuing.")
else {
if (!compatiblePackages.any { it.name == packageName }) {
logger.info("$prefix: Incompatible package")
@@ -63,7 +63,7 @@ fun Patcher.applyPatchesVerbose() {
return@forEach
}
logger.severe("Error: $patch")
logger.error("Error: $patch")
result.exceptionOrNull()!!.printStackTrace()
}