diff options
author | Allan Wang <me@allanwang.ca> | 2021-11-18 14:45:22 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-18 14:45:22 -0800 |
commit | 4c06d0ae4a4b2c8450ec68dd9b64d472cdd0202d (patch) | |
tree | 859d3dc7021d31f807c5ad90ddea31f711fa793d /core/src/main/kotlin/ca/allanwang/kau/logging/KauLogger.kt | |
parent | e2ac8e3e82b842ea05c8c7a2c92d566553d8ea91 (diff) | |
parent | a9b8b69ab5e053e9106a98564e3a4047628387d6 (diff) | |
download | kau-6.4.0.tar.gz kau-6.4.0.tar.bz2 kau-6.4.0.zip |
Merge pull request #270 from AllanWang/versions6.4.0
Diffstat (limited to 'core/src/main/kotlin/ca/allanwang/kau/logging/KauLogger.kt')
-rw-r--r-- | core/src/main/kotlin/ca/allanwang/kau/logging/KauLogger.kt | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/core/src/main/kotlin/ca/allanwang/kau/logging/KauLogger.kt b/core/src/main/kotlin/ca/allanwang/kau/logging/KauLogger.kt index a9a97b7..1475720 100644 --- a/core/src/main/kotlin/ca/allanwang/kau/logging/KauLogger.kt +++ b/core/src/main/kotlin/ca/allanwang/kau/logging/KauLogger.kt @@ -113,14 +113,18 @@ class KauLoggerExtension(val tag: String, val logger: KauLogger) { } inline fun log(priority: Int, message: () -> Any?, t: Throwable? = null) = - logger.log(priority, { - val msg = message()?.toString() - if (msg == null) { - null - } else { - "$tag: $msg" - } - }, t) + logger.log( + priority, + { + val msg = message()?.toString() + if (msg == null) { + null + } else { + "$tag: $msg" + } + }, + t + ) inline fun checkThread(id: Int) { d { |