mirror of
https://github.com/revanced/revanced-cli.git
synced 2025-01-07 09:45:50 +01:00
feat: add logging back
This commit is contained in:
parent
8c325af0f9
commit
4a23cb69bc
@ -1,6 +1,7 @@
|
|||||||
package app.revanced.cli.command
|
package app.revanced.cli.command
|
||||||
|
|
||||||
import app.revanced.cli.patcher.Patcher
|
import app.revanced.cli.patcher.Patcher
|
||||||
|
import app.revanced.cli.patcher.PatcherLogger
|
||||||
import app.revanced.cli.signing.Signing
|
import app.revanced.cli.signing.Signing
|
||||||
import app.revanced.cli.signing.SigningOptions
|
import app.revanced.cli.signing.SigningOptions
|
||||||
import app.revanced.patcher.PatcherOptions
|
import app.revanced.patcher.PatcherOptions
|
||||||
@ -91,7 +92,10 @@ internal object MainCommand : Runnable {
|
|||||||
|
|
||||||
val patcher = app.revanced.patcher.Patcher(
|
val patcher = app.revanced.patcher.Patcher(
|
||||||
PatcherOptions(
|
PatcherOptions(
|
||||||
args.inputFile, args.cacheDirectory, !args.disableResourcePatching
|
args.inputFile,
|
||||||
|
args.cacheDirectory,
|
||||||
|
!args.disableResourcePatching,
|
||||||
|
logger = PatcherLogger
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
23
src/main/kotlin/app/revanced/cli/patcher/PatcherLogger.kt
Normal file
23
src/main/kotlin/app/revanced/cli/patcher/PatcherLogger.kt
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
package app.revanced.cli.patcher
|
||||||
|
|
||||||
|
import app.revanced.patcher.PatchLogger
|
||||||
|
|
||||||
|
object PatcherLogger : PatchLogger {
|
||||||
|
private const val prefix = "[patcher]"
|
||||||
|
|
||||||
|
override fun error(msg: String) {
|
||||||
|
println("error: $prefix: $msg")
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun info(msg: String) {
|
||||||
|
println("info: $prefix: $msg")
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun trace(msg: String) {
|
||||||
|
println("trace: $prefix: $msg")
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun warn(msg: String) {
|
||||||
|
println("warn: $prefix: $msg")
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user