aboutsummaryrefslogtreecommitdiff
path: root/core/src/main/kotlin/ca/allanwang/kau/logging/TimberLogger.kt
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/main/kotlin/ca/allanwang/kau/logging/TimberLogger.kt')
-rw-r--r--core/src/main/kotlin/ca/allanwang/kau/logging/TimberLogger.kt2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/src/main/kotlin/ca/allanwang/kau/logging/TimberLogger.kt b/core/src/main/kotlin/ca/allanwang/kau/logging/TimberLogger.kt
index 5969fd5..e0f6cae 100644
--- a/core/src/main/kotlin/ca/allanwang/kau/logging/TimberLogger.kt
+++ b/core/src/main/kotlin/ca/allanwang/kau/logging/TimberLogger.kt
@@ -11,7 +11,7 @@ import timber.log.Timber
open class TimberLogger(tag: String) {
internal val TAG = "$tag: %s"
fun e(s: String) = Timber.e(TAG, s)
- fun e(t: Throwable, s: String = "error") = Timber.e(t, TAG, s)
+ fun e(t: Throwable?, s: String = "error") = if (t == null) e(s) else Timber.e(t, TAG, s)
fun d(s: String) = Timber.d(TAG, s)
fun i(s: String) = Timber.i(TAG, s)
fun v(s: String) = Timber.v(TAG, s)