aboutsummaryrefslogtreecommitdiff
path: root/core/src/main/kotlin/ca/allanwang/kau/logging
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2017-08-05 14:49:47 -0700
committerGitHub <noreply@github.com>2017-08-05 14:49:47 -0700
commitc707d42b311f96cbabc1971f98598c8b8922ba16 (patch)
tree3c592c2a8bdd2fb759e3632adf038b5d7cecfabb /core/src/main/kotlin/ca/allanwang/kau/logging
parentbafc1996d803862d30a2c7d0c402d30c79c4f647 (diff)
downloadkau-c707d42b311f96cbabc1971f98598c8b8922ba16.tar.gz
kau-c707d42b311f96cbabc1971f98598c8b8922ba16.tar.bz2
kau-c707d42b311f96cbabc1971f98598c8b8922ba16.zip
Swipe (#24)
* Test emulator * Update readme * Update fastadapter and about listing * Make faq parser asynchronous * Modularize about panels * Add basis for faq * Test and finalize the faq panel * Update readme * Update changelog * Remove emulator for now * Update sample * Change back to manual versioning to avoid suggestion errors * Add awesome-kt banner * Fix faq background color * Fix merge conflicts 2 * Add waffle badge * Update readme * Fix lint * Create FileUtils and NotificationUtils * Remove frost hardcode * Fix simple date * Update swipe to use weak references * Initializing test dependencies * Update to gradle 4.1 * Fix lint warnings * Drop back down and fix errors * Finalize swipe with example * Finalize weak reference and ordering * Update test code * Make loggers inline
Diffstat (limited to 'core/src/main/kotlin/ca/allanwang/kau/logging')
-rw-r--r--core/src/main/kotlin/ca/allanwang/kau/logging/TimberLogger.kt16
1 files changed, 9 insertions, 7 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 e0f6cae..4c6d655 100644
--- a/core/src/main/kotlin/ca/allanwang/kau/logging/TimberLogger.kt
+++ b/core/src/main/kotlin/ca/allanwang/kau/logging/TimberLogger.kt
@@ -1,3 +1,5 @@
+@file:Suppress("NOTHING_TO_INLINE")
+
package ca.allanwang.kau.logging
import timber.log.Timber
@@ -9,11 +11,11 @@ import timber.log.Timber
* Timber extension that will embed the tag as part of the message for each log item
*/
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") = 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)
- fun eThrow(s: String) = e(Throwable(s))
+ val TAG = "$tag: %s"
+ inline fun e(s: String) = Timber.e(TAG, s)
+ inline fun e(t: Throwable?, s: String = "error") = if (t == null) e(s) else Timber.e(t, TAG, s)
+ inline fun d(s: String) = Timber.d(TAG, s)
+ inline fun i(s: String) = Timber.i(TAG, s)
+ inline fun v(s: String) = Timber.v(TAG, s)
+ inline fun eThrow(s: String) = e(Throwable(s))
} \ No newline at end of file