mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-16 19:05:02 -04:00
log: add reset to every line
This commit is contained in:
parent
635e8a7aa9
commit
dd4c3f8eae
@ -35,6 +35,8 @@ import kotlin.contracts.contract
|
||||
|
||||
@OptIn(ExperimentalContracts::class)
|
||||
object Log {
|
||||
@Deprecated("Kutil 1.24")
|
||||
private val RESET = ANSI.formatting(0)
|
||||
var ASYNC_LOGGING = true
|
||||
private val MINOSOFT_START_TIME = millis()
|
||||
private val TIME_FORMAT = SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS")
|
||||
@ -99,9 +101,9 @@ object Log {
|
||||
SYSTEM_OUT_STREAM
|
||||
}
|
||||
|
||||
val prefix = message.ansiColoredMessage.removeSuffix(ANSI.formatting(0)) // reset suffix
|
||||
val prefix = message.ansiColoredMessage.removeSuffix(RESET) // reset suffix
|
||||
for (line in this.message.ansiColoredMessage.lineSequence()) {
|
||||
stream.println(prefix + line)
|
||||
stream.println(prefix + line + RESET)
|
||||
}
|
||||
|
||||
} catch (exception: Throwable) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user