mirror of
https://github.com/revanced/revanced-patcher.git
synced 2025-05-16 19:27:05 +02:00
feat: logging class
This commit is contained in:
parent
a4529c3fee
commit
caf2745805
@ -1,15 +0,0 @@
|
||||
package app.revanced.patcher
|
||||
|
||||
interface PatchLogger {
|
||||
fun error(msg: String)
|
||||
fun warn(msg: String)
|
||||
fun info(msg: String)
|
||||
fun trace(msg: String)
|
||||
}
|
||||
|
||||
internal object NoopPatchLogger : PatchLogger {
|
||||
override fun error(msg: String) {}
|
||||
override fun warn(msg: String) {}
|
||||
override fun info(msg: String) {}
|
||||
override fun trace(msg: String) {}
|
||||
}
|
@ -1,5 +1,7 @@
|
||||
package app.revanced.patcher
|
||||
|
||||
import app.revanced.patcher.logging.impl.NopLogger
|
||||
import app.revanced.patcher.logging.Logger
|
||||
import java.io.File
|
||||
|
||||
/**
|
||||
@ -17,5 +19,5 @@ data class PatcherOptions(
|
||||
internal val patchResources: Boolean = false,
|
||||
internal val aaptPath: String = "",
|
||||
internal val frameworkFolderLocation: String? = null,
|
||||
internal val logger: PatchLogger = NoopPatchLogger
|
||||
internal val logger: Logger = NopLogger
|
||||
)
|
||||
|
8
src/main/kotlin/app/revanced/patcher/logging/Logger.kt
Normal file
8
src/main/kotlin/app/revanced/patcher/logging/Logger.kt
Normal file
@ -0,0 +1,8 @@
|
||||
package app.revanced.patcher.logging
|
||||
|
||||
interface Logger {
|
||||
fun error(msg: String) {}
|
||||
fun warn(msg: String) {}
|
||||
fun info(msg: String) {}
|
||||
fun trace(msg: String) {}
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
package app.revanced.patcher.logging.impl
|
||||
|
||||
import app.revanced.patcher.logging.Logger
|
||||
|
||||
object NopLogger : Logger
|
Loading…
x
Reference in New Issue
Block a user