mirror of
https://github.com/ReVanced/revanced-cli.git
synced 2026-01-21 02:13:58 +00:00
fix: Log not showing in CLI (#80)
* 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
This commit is contained in:
@@ -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()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user