From f52e60617002160c0499576fd8b8495ee4a0df61 Mon Sep 17 00:00:00 2001 From: Cedric Beust Date: Mon, 9 Nov 2015 22:47:49 -0800 Subject: [PATCH] Show stack traces. --- src/main/kotlin/com/beust/kobalt/misc/KobaltLogger.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/kotlin/com/beust/kobalt/misc/KobaltLogger.kt b/src/main/kotlin/com/beust/kobalt/misc/KobaltLogger.kt index 6fdd6ef6..aec62303 100644 --- a/src/main/kotlin/com/beust/kobalt/misc/KobaltLogger.kt +++ b/src/main/kotlin/com/beust/kobalt/misc/KobaltLogger.kt @@ -50,7 +50,7 @@ class Logger(val dev: Boolean) { final fun error(tag: String, message: String, e: Throwable? = null) { println(getPattern("***** E", "***** ERROR ", tag, message) + if (e != null && KobaltLogger.LOG_LEVEL > 1) " Exception: " + e.message else "") - if (KobaltLogger.LOG_LEVEL > 1) { + if (KobaltLogger.LOG_LEVEL > 0) { e?.printStackTrace() } }