mirror of
https://github.com/ReVanced/revanced-cli.git
synced 2026-01-18 00:43:58 +00:00
Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c183c38f2a | ||
|
|
d9c5a179c5 | ||
|
|
6447311b0a | ||
|
|
2015c2a1dc | ||
|
|
99f123d1ca | ||
|
|
6ccbec6c95 | ||
|
|
9c30eac7c1 | ||
|
|
a26b0ea64d |
1
.github/ISSUE_TEMPLATE/bug_report.md
vendored
1
.github/ISSUE_TEMPLATE/bug_report.md
vendored
@@ -3,7 +3,6 @@ name: Bug report
|
|||||||
about: Create a bug report on the CLI. Do not submit suggestions for patches here.
|
about: Create a bug report on the CLI. Do not submit suggestions for patches here.
|
||||||
title: 'problem: some problem'
|
title: 'problem: some problem'
|
||||||
labels: bug
|
labels: bug
|
||||||
assignees: TheJeterLP, oSumAtrIX, Sculas, epicsampler
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
1
.github/ISSUE_TEMPLATE/feature_request.md
vendored
1
.github/ISSUE_TEMPLATE/feature_request.md
vendored
@@ -3,7 +3,6 @@ name: Feature request
|
|||||||
about: Suggest a change to the CLI. Do not submit suggestions for patches here.
|
about: Suggest a change to the CLI. Do not submit suggestions for patches here.
|
||||||
title: 'feat: some feature'
|
title: 'feat: some feature'
|
||||||
labels: feature-request
|
labels: feature-request
|
||||||
assignees: TheJeterLP, oSumAtrIX, Sculas, epicsampler
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
21
CHANGELOG.md
21
CHANGELOG.md
@@ -1,3 +1,24 @@
|
|||||||
|
## [2.5.3](https://github.com/revanced/revanced-cli/compare/v2.5.2...v2.5.3) (2022-07-11)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* Log not showing in CLI ([#80](https://github.com/revanced/revanced-cli/issues/80)) ([d9c5a17](https://github.com/revanced/revanced-cli/commit/d9c5a179c529c386f66df4fa63cd321d396836b5)), closes [#79](https://github.com/revanced/revanced-cli/issues/79)
|
||||||
|
|
||||||
|
## [2.5.2](https://github.com/revanced/revanced-cli/compare/v2.5.1...v2.5.2) (2022-07-10)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* `defaultExclude` unused ([2015c2a](https://github.com/revanced/revanced-cli/commit/2015c2a1dcc0290af237e2eb1ab4aaf5fc84d382))
|
||||||
|
|
||||||
|
## [2.5.1](https://github.com/revanced/revanced-cli/compare/v2.5.0...v2.5.1) (2022-07-10)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* Make clear what the --exclusive command actually does ([a26b0ea](https://github.com/revanced/revanced-cli/commit/a26b0ea64dcd0757b5b49c09137959751874d955))
|
||||||
|
|
||||||
# [2.5.0](https://github.com/revanced/revanced-cli/compare/v2.4.0...v2.5.0) (2022-07-10)
|
# [2.5.0](https://github.com/revanced/revanced-cli/compare/v2.4.0...v2.5.0) (2022-07-10)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
kotlin.code.style = official
|
kotlin.code.style = official
|
||||||
version = 2.5.0
|
version = 2.5.3
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ internal object MainCommand : Runnable {
|
|||||||
@Option(names = ["-e", "--exclude"], description = ["Explicitly exclude patches"])
|
@Option(names = ["-e", "--exclude"], description = ["Explicitly exclude patches"])
|
||||||
var excludedPatches = arrayOf<String>()
|
var excludedPatches = arrayOf<String>()
|
||||||
|
|
||||||
@Option(names = ["--exclusive"], description = ["Exclusively include patches"])
|
@Option(names = ["--exclusive"], description = ["Only installs the patches you include, not including any patch by default"])
|
||||||
var defaultExclude = false
|
var defaultExclude = false
|
||||||
|
|
||||||
@Option(names = ["-i", "--include"], description = ["Include patches"])
|
@Option(names = ["-i", "--include"], description = ["Include patches"])
|
||||||
|
|||||||
@@ -4,17 +4,19 @@ import app.revanced.cli.command.MainCommand
|
|||||||
import app.revanced.cli.logging.CliLogger
|
import app.revanced.cli.logging.CliLogger
|
||||||
import java.util.logging.Logger
|
import java.util.logging.Logger
|
||||||
import java.util.logging.SimpleFormatter
|
import java.util.logging.SimpleFormatter
|
||||||
import java.util.logging.StreamHandler
|
|
||||||
|
|
||||||
internal class DefaultCliLogger(
|
internal class DefaultCliLogger(
|
||||||
private val logger: Logger = Logger.getLogger(MainCommand::javaClass.name),
|
private val logger: Logger = Logger.getLogger(MainCommand::class.java.name),
|
||||||
private val errorLogger: Logger = Logger.getLogger(MainCommand::javaClass.name + "Err")
|
private val errorLogger: Logger = Logger.getLogger(logger.name + "Err")
|
||||||
) : CliLogger {
|
) : CliLogger {
|
||||||
|
|
||||||
init {
|
init {
|
||||||
logger.useParentHandlers = false
|
logger.useParentHandlers = false
|
||||||
logger.addHandler(StreamHandler(System.out, SimpleFormatter()))
|
if (logger.handlers.isEmpty()) {
|
||||||
|
logger.addHandler(FlushingStreamHandler(System.out, SimpleFormatter()))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
init {
|
init {
|
||||||
System.setProperty("java.util.logging.SimpleFormatter.format", "%4\$s: %5\$s %n")
|
System.setProperty("java.util.logging.SimpleFormatter.format", "%4\$s: %5\$s %n")
|
||||||
|
|||||||
@@ -0,0 +1,13 @@
|
|||||||
|
package app.revanced.cli.logging.impl
|
||||||
|
|
||||||
|
import java.io.OutputStream
|
||||||
|
import java.util.logging.Formatter
|
||||||
|
import java.util.logging.LogRecord
|
||||||
|
import java.util.logging.StreamHandler
|
||||||
|
|
||||||
|
internal class FlushingStreamHandler(out: OutputStream, format: Formatter) : StreamHandler(out, format) {
|
||||||
|
override fun publish(record: LogRecord) {
|
||||||
|
super.publish(record)
|
||||||
|
flush()
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -4,7 +4,7 @@ import app.revanced.cli.logging.impl.DefaultCliLogger
|
|||||||
import java.util.logging.Logger
|
import java.util.logging.Logger
|
||||||
|
|
||||||
internal object PatcherLogger : app.revanced.patcher.logging.Logger{
|
internal object PatcherLogger : app.revanced.patcher.logging.Logger{
|
||||||
private val logger = DefaultCliLogger(Logger.getLogger(app.revanced.patcher.Patcher::javaClass.name))
|
private val logger = DefaultCliLogger(Logger.getLogger(app.revanced.patcher.Patcher::class.java.name))
|
||||||
|
|
||||||
override fun error(msg: String) = logger.error(msg)
|
override fun error(msg: String) = logger.error(msg)
|
||||||
override fun info(msg: String) = logger.info(msg)
|
override fun info(msg: String) = logger.info(msg)
|
||||||
|
|||||||
@@ -28,8 +28,8 @@ fun Patcher.addPatchesFiltered() {
|
|||||||
if (args.excludedPatches.contains(patchName)) {
|
if (args.excludedPatches.contains(patchName)) {
|
||||||
logger.info("$prefix: Explicitely excluded")
|
logger.info("$prefix: Explicitely excluded")
|
||||||
return@patch
|
return@patch
|
||||||
} else if (!patch.include && !args.includedPatches.contains(patchName)) {
|
} else if ((!patch.include || args.defaultExclude) && !args.includedPatches.contains(patchName)) {
|
||||||
logger.info("$prefix: Not explicitely included")
|
logger.info("$prefix: Not explicitly included")
|
||||||
return@patch
|
return@patch
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user