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

Logger fix.

This commit is contained in:
Cedric Beust 2015-11-12 03:44:07 -08:00
parent 1e1b6c9fdd
commit 89262e9259

View file

@ -55,8 +55,10 @@ class Logger(val dev: Boolean) {
}
}
final fun warn(tag: String, message: String, e: Throwable? = null) =
println(getPattern("W", "***** WARNING ${e?.message}", tag, message))
final fun warn(tag: String, message: String, e: Throwable? = null) {
val fullMessage = e?.message ?: message
println(getPattern("W", "***** WARNING ", tag, fullMessage))
}
final fun log(tag: String, message: String, newLine: Boolean) =
with(getPattern("L", "", tag, message)) {