From 9a35dbef9f660c1c52a6c5d6d6d4b4f425211d22 Mon Sep 17 00:00:00 2001 From: GeorgCantor Date: Sun, 19 Nov 2023 19:46:10 +0300 Subject: [PATCH] Simplify --- .../walletlibrary/did/sdk/util/log/DefaultLogConsumer.kt | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/walletlibrary/src/main/java/com/microsoft/walletlibrary/did/sdk/util/log/DefaultLogConsumer.kt b/walletlibrary/src/main/java/com/microsoft/walletlibrary/did/sdk/util/log/DefaultLogConsumer.kt index c5a24744..3b269860 100644 --- a/walletlibrary/src/main/java/com/microsoft/walletlibrary/did/sdk/util/log/DefaultLogConsumer.kt +++ b/walletlibrary/src/main/java/com/microsoft/walletlibrary/did/sdk/util/log/DefaultLogConsumer.kt @@ -15,14 +15,12 @@ internal class DefaultLogConsumer : SdkLog.Consumer { } override fun event(name: String, properties: Map?) { - val sb = StringBuilder() - properties?.forEach { - sb.append("${it.key}: ${it.value}\n") + properties?.entries?.joinToString(separator = "\n") { "${it.key}: ${it.value}" }?.let { + Log.i(name, it) } - Log.i(name, sb.toString()) } private fun getAndroidLogLevel(logLevel: SdkLog.Level): Int { return logLevel.severity() + 2 } -} \ No newline at end of file +}