aboutsummaryrefslogtreecommitdiff
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
parent744b7680104eeead46345ede9d5a1aa22820247f (diff)
downloadkau-e1e3b370007340573a61bc3daae18c009ff28a53.tar.gz
kau-e1e3b370007340573a61bc3daae18c009ff28a53.tar.bz2
kau-e1e3b370007340573a61bc3daae18c009ff28a53.zip
Better throwable logging
-rw-r--r--docs/Changelog.md3
-rw-r--r--library/src/main/kotlin/ca/allanwang/kau/logging/TimberLogger.kt3
2 files changed, 4 insertions, 2 deletions
diff --git a/docs/Changelog.md b/docs/Changelog.md
index 0d693bb..2f8b61c 100644
--- a/docs/Changelog.md
+++ b/docs/Changelog.md
@@ -2,11 +2,12 @@
## v1.4
* Added about activities
-* Added animated fast item adapter
+* Added themed fast item adapter
* Added chained adapter
* Added item animators
* Ported some views over from Plaid
* Add string arg option for sendEmail
+* Add many iitems
## v1.3
* Added kpref subitems
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