aboutsummaryrefslogtreecommitdiff
path: root/library
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2017-06-29 23:30:09 -0700
committerAllan Wang <me@allanwang.ca>2017-06-29 23:30:09 -0700
commite1e3b370007340573a61bc3daae18c009ff28a53 (patch)
tree854c737b041fbfaab0bbc61e3e50e3ef723ebf90 /library
parent744b7680104eeead46345ede9d5a1aa22820247f (diff)
downloadkau-e1e3b370007340573a61bc3daae18c009ff28a53.tar.gz
kau-e1e3b370007340573a61bc3daae18c009ff28a53.tar.bz2
kau-e1e3b370007340573a61bc3daae18c009ff28a53.zip
Better throwable logging
Diffstat (limited to 'library')
-rw-r--r--library/src/main/kotlin/ca/allanwang/kau/logging/TimberLogger.kt3
1 files changed, 2 insertions, 1 deletions
diff --git a/library/src/main/kotlin/ca/allanwang/kau/logging/TimberLogger.kt b/library/src/main/kotlin/ca/allanwang/kau/logging/TimberLogger.kt
index 02f5219..5969fd5 100644
--- a/library/src/main/kotlin/ca/allanwang/kau/logging/TimberLogger.kt
+++ b/library/src/main/kotlin/ca/allanwang/kau/logging/TimberLogger.kt
@@ -11,8 +11,9 @@ 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) = Timber.e(t, TAG, "error")
+ fun e(t: Throwable, s: String = "error") = 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)
+ fun eThrow(s: String) = e(Throwable(s))
} \ No newline at end of file