1
0
Fork 0
mirror of https://github.com/ethauvin/kobalt.git synced 2025-04-26 00:17:11 -07:00

Color for error/warning.

This commit is contained in:
Cedric Beust 2015-12-13 08:26:12 +04:00
parent 4fb726be91
commit 85a092b1cd
2 changed files with 3 additions and 2 deletions

View file

@ -90,7 +90,8 @@ class AsciiArt {
private fun yellow(s: String) = wrap(s, YELLOW)
fun taskColor(s: String) = s
fun errorColor(s: String) = s
fun errorColor(s: String) = red(s)
fun warnColor(s: String) = red(s)
}
}

View file

@ -75,7 +75,7 @@ class Logger(val dev: Boolean) {
final fun warn(tag: String, message: String, e: Throwable? = null) {
val fullMessage = "***** WARNING " + (e?.message ?: message)
println(getPattern("W", fullMessage, fullMessage, tag))
println(AsciiArt.Companion.warnColor(getPattern("W", fullMessage, fullMessage, tag)))
}
final fun log(tag: String, message: String, newLine: Boolean) =