diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/service/notifications/RegisterAccounts.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/service/notifications/RegisterAccounts.kt index 7f734a02f..7c7d818f6 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/service/notifications/RegisterAccounts.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/service/notifications/RegisterAccounts.kt @@ -132,7 +132,7 @@ class RegisterAccounts( val client = client(url) client.newCall(request).executeAsync().use { response -> - Log.i(tag, "Server registration ${response.isSuccessful}") + Log.i(tag) { "Server registration ${response.isSuccessful}" } } } diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/service/uploads/VideoCompressionHelper.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/service/uploads/VideoCompressionHelper.kt index 945bf32b5..5fd52757e 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/service/uploads/VideoCompressionHelper.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/service/uploads/VideoCompressionHelper.kt @@ -299,7 +299,7 @@ object VideoCompressionHelper { if (cursor.moveToFirst()) cursor.getLong(sizeIndex) else 0L } ?: 0L } catch (e: Exception) { - Log.w(LOG_TAG, "Failed to get file size: ${e.message}") + Log.w(LOG_TAG) { "Failed to get file size: ${e.message}" } 0L } @@ -348,13 +348,13 @@ object VideoCompressionHelper { null } } catch (e: Exception) { - Log.w(LOG_TAG, "Failed to get video resolution: ${e.message}") + Log.w(LOG_TAG) { "Failed to get video resolution: ${e.message}" } null } finally { try { retriever?.release() } catch (e: Exception) { - Log.w(LOG_TAG, "Failed to release MediaMetadataRetriever: ${e.message}") + Log.w(LOG_TAG) { "Failed to release MediaMetadataRetriever: ${e.message}" } } } } diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/actions/uploads/VoiceAnonymizationController.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/actions/uploads/VoiceAnonymizationController.kt index 29ec80aec..9883511d3 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/actions/uploads/VoiceAnonymizationController.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/actions/uploads/VoiceAnonymizationController.kt @@ -112,7 +112,7 @@ class VoiceAnonymizationController( if (result.file.delete()) { Log.d(logTag) { "Deleted distorted file: ${result.file.absolutePath}" } } else { - Log.w(logTag, "Failed to delete distorted file: ${result.file.absolutePath}") + Log.w(logTag) { "Failed to delete distorted file: ${result.file.absolutePath}" } } } } catch (e: Exception) { diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/components/ShareHelper.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/components/ShareHelper.kt index 90bad3c7f..2b91c47c1 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/components/ShareHelper.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/components/ShareHelper.kt @@ -250,7 +250,7 @@ object ShareHelper { if (!renamed) { tempFile.copyTo(sharableFile, overwrite = true) if (!tempFile.delete()) { - Log.w(TAG, "Failed to delete temp file ${tempFile.path} after copy") + Log.w(TAG) { "Failed to delete temp file ${tempFile.path} after copy" } } } } diff --git a/benchmark/src/androidTest/java/com/vitorpamplona/quartz/benchmark/LargeDBInsertBenchmark.kt b/benchmark/src/androidTest/java/com/vitorpamplona/quartz/benchmark/LargeDBInsertBenchmark.kt index 6694997de..4350ecafe 100644 --- a/benchmark/src/androidTest/java/com/vitorpamplona/quartz/benchmark/LargeDBInsertBenchmark.kt +++ b/benchmark/src/androidTest/java/com/vitorpamplona/quartz/benchmark/LargeDBInsertBenchmark.kt @@ -57,7 +57,7 @@ class LargeDBInsertBenchmark : BaseLargeCacheBenchmark() { try { db.insert(event) } catch (e: SQLiteException) { - Log.w("LargeDBInsertBenchmark", "Error inserting event: ${e.message} for event: ${event.toJson()}") + Log.w("LargeDBInsertBenchmark") { "Error inserting event: ${e.message} for event: ${event.toJson()}" } } } runWithMeasurementDisabled { @@ -87,7 +87,7 @@ class LargeDBInsertBenchmark : BaseLargeCacheBenchmark() { try { db.insert(event) } catch (e: SQLiteException) { - Log.w("LargeDBInsertBenchmark", "Error inserting event: ${e.message} for event: ${event.toJson()}") + Log.w("LargeDBInsertBenchmark") { "Error inserting event: ${e.message} for event: ${event.toJson()}" } } } db @@ -97,7 +97,7 @@ class LargeDBInsertBenchmark : BaseLargeCacheBenchmark() { try { db.insert(event) } catch (e: SQLiteException) { - Log.w("LargeDBInsertBenchmark", "Error inserting event: ${e.message} for event: $event") + Log.w("LargeDBInsertBenchmark") { "Error inserting event: ${e.message} for event: $event" } } } diff --git a/benchmark/src/androidTest/java/com/vitorpamplona/quartz/benchmark/LargeDBQueryingBenchmark.kt b/benchmark/src/androidTest/java/com/vitorpamplona/quartz/benchmark/LargeDBQueryingBenchmark.kt index 2a1764ddb..70a605be7 100644 --- a/benchmark/src/androidTest/java/com/vitorpamplona/quartz/benchmark/LargeDBQueryingBenchmark.kt +++ b/benchmark/src/androidTest/java/com/vitorpamplona/quartz/benchmark/LargeDBQueryingBenchmark.kt @@ -61,7 +61,7 @@ class LargeDBQueryingBenchmark : BaseLargeCacheBenchmark() { try { db.insert(event) } catch (e: SQLiteException) { - Log.w("LargeDBQueryingBenchmark", "Error inserting event: ${e.message} for event: ${event.toJson()}") + Log.w("LargeDBQueryingBenchmark") { "Error inserting event: ${e.message} for event: ${event.toJson()}" } } } } diff --git a/quartz/src/commonMain/kotlin/com/vitorpamplona/quartz/nip01Core/relay/client/accessories/RelayLogger.kt b/quartz/src/commonMain/kotlin/com/vitorpamplona/quartz/nip01Core/relay/client/accessories/RelayLogger.kt index c622e648f..ba3c1e5a3 100644 --- a/quartz/src/commonMain/kotlin/com/vitorpamplona/quartz/nip01Core/relay/client/accessories/RelayLogger.kt +++ b/quartz/src/commonMain/kotlin/com/vitorpamplona/quartz/nip01Core/relay/client/accessories/RelayLogger.kt @@ -59,12 +59,12 @@ class RelayLogger( when (msg) { is EventMessage -> if (debugReceiving) Log.d(logTag) { "Received: $msgStr" } is EoseMessage -> if (debugReceiving) Log.d(logTag) { "EOSE: ${msg.subId}" } - is NoticeMessage -> Log.w(logTag, "Notice: ${msg.message}") + is NoticeMessage -> Log.w(logTag) { "Notice: ${msg.message}" } is OkMessage -> if (debugReceiving) Log.d(logTag) { "OK: ${msg.eventId} ${msg.success} ${msg.message}" } is AuthMessage -> if (debugReceiving) Log.d(logTag) { "Auth: ${msg.challenge}" } is NotifyMessage -> if (debugReceiving) Log.d(logTag) { "Notify: ${msg.message}" } is CountMessage -> if (debugReceiving) Log.d(logTag) { "Count: ${msg.result.count} approx: ${msg.result.approximate} hll: ${msg.result.hll != null}" } - is ClosedMessage -> Log.w(logTag, "Closed: ${msg.subId} ${msg.message}") + is ClosedMessage -> Log.w(logTag) { "Closed: ${msg.subId} ${msg.message}" } } }