mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-26 08:27:12 -07:00
Color for error/warning.
This commit is contained in:
parent
4fb726be91
commit
85a092b1cd
2 changed files with 3 additions and 2 deletions
|
@ -90,7 +90,8 @@ class AsciiArt {
|
||||||
private fun yellow(s: String) = wrap(s, YELLOW)
|
private fun yellow(s: String) = wrap(s, YELLOW)
|
||||||
|
|
||||||
fun taskColor(s: String) = s
|
fun taskColor(s: String) = s
|
||||||
fun errorColor(s: String) = s
|
fun errorColor(s: String) = red(s)
|
||||||
|
fun warnColor(s: String) = red(s)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -75,7 +75,7 @@ class Logger(val dev: Boolean) {
|
||||||
|
|
||||||
final fun warn(tag: String, message: String, e: Throwable? = null) {
|
final fun warn(tag: String, message: String, e: Throwable? = null) {
|
||||||
val fullMessage = "***** WARNING " + (e?.message ?: message)
|
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) =
|
final fun log(tag: String, message: String, newLine: Boolean) =
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue