diff options
author | Allan Wang <me@allanwang.ca> | 2018-12-25 21:45:26 -0500 |
---|---|---|
committer | Allan Wang <me@allanwang.ca> | 2018-12-25 21:45:26 -0500 |
commit | f931e55d534e6162748f9fa888e7313cc2f0b619 (patch) | |
tree | 34ee7c82f49420d83ee44d77cace56cd8fbd3582 /core/src/main/kotlin/ca/allanwang/kau/logging | |
parent | d850474b0a82ee00d094990d9bd3392ae8cd9575 (diff) | |
download | kau-f931e55d534e6162748f9fa888e7313cc2f0b619.tar.gz kau-f931e55d534e6162748f9fa888e7313cc2f0b619.tar.bz2 kau-f931e55d534e6162748f9fa888e7313cc2f0b619.zip |
Use withContext instead of async
Diffstat (limited to 'core/src/main/kotlin/ca/allanwang/kau/logging')
-rw-r--r-- | core/src/main/kotlin/ca/allanwang/kau/logging/KL.kt | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/core/src/main/kotlin/ca/allanwang/kau/logging/KL.kt b/core/src/main/kotlin/ca/allanwang/kau/logging/KL.kt index 52e5415..9fbc070 100644 --- a/core/src/main/kotlin/ca/allanwang/kau/logging/KL.kt +++ b/core/src/main/kotlin/ca/allanwang/kau/logging/KL.kt @@ -23,8 +23,12 @@ import ca.allanwang.kau.BuildConfig * Internal KAU logger */ object KL : KauLogger("KAU", { BuildConfig.DEBUG }) { - internal inline fun test(message: () -> Any?) { + + /** + * Logger with searchable tag and thread info + */ + inline fun test(message: () -> Any?) { if (BuildConfig.DEBUG) - d { "Test1234 ${message()}" } + d { "Test1234 ${Thread.currentThread().name} ${message()}" } } } |