mirror of
https://github.com/revanced/revanced-cli.git
synced 2024-06-02 11:26:06 +02:00
d9c5a179c5
* Fix #79. Changed from default StreamHandler to FlushingStreamHandler which flushes after every log statement * Added removal of handlers, so they will not be duplicated. * Replaced removal of handlers with addition only in case if there are no handlers already. Changed errorLogger name from hardcoded to reusing previous logger name, so it will have the same name if only first parameter is used. * Replaced calls ::javaClass.name to ::class.java.name to have proper class names in loggers
13 lines
530 B
Kotlin
13 lines
530 B
Kotlin
package app.revanced.cli.patcher.logging.impl
|
|
|
|
import app.revanced.cli.logging.impl.DefaultCliLogger
|
|
import java.util.logging.Logger
|
|
|
|
internal object PatcherLogger : app.revanced.patcher.logging.Logger{
|
|
private val logger = DefaultCliLogger(Logger.getLogger(app.revanced.patcher.Patcher::class.java.name))
|
|
|
|
override fun error(msg: String) = logger.error(msg)
|
|
override fun info(msg: String) = logger.info(msg)
|
|
override fun warn(msg: String)= logger.warn(msg)
|
|
override fun trace(msg: String)= logger.trace(msg)
|
|
} |