Using Log.debug instead of println for State Dump action

This commit is contained in:
Vitor Pamplona
2023-03-09 08:48:11 -05:00
parent 30e2070b89
commit ceb0895b8d
2 changed files with 7 additions and 7 deletions
@@ -45,7 +45,7 @@ abstract class NostrDataSource(val debugName: String) {
fun printCounter() { fun printCounter() {
eventCounter.forEach { eventCounter.forEach {
println("AAA Count ${it.key}: ${it.value.counter}") Log.d("STATE DUMP", "Received Events ${it.key}: ${it.value.counter}")
} }
} }
@@ -124,7 +124,7 @@ fun MainTopBar(scaffoldState: ScaffoldState, accountViewModel: AccountViewModel)
.joinToString { it.filter.toJson() } .joinToString { it.filter.toJson() }
}" }"
}.forEach { }.forEach {
Log.d("CURRENT FILTERS", it) Log.d("STATE DUMP", it)
} }
NostrAccountDataSource.printCounter() NostrAccountDataSource.printCounter()
@@ -143,14 +143,14 @@ fun MainTopBar(scaffoldState: ScaffoldState, accountViewModel: AccountViewModel)
NostrUserProfileDataSource.printCounter() NostrUserProfileDataSource.printCounter()
println("Connected Relays: " + RelayPool.connectedRelays()) Log.d("STATE DUMP", "Connected Relays: " + RelayPool.connectedRelays())
val imageLoader = Coil.imageLoader(context) val imageLoader = Coil.imageLoader(context)
println("Image Disk Cache ${(imageLoader.diskCache?.size ?: 0) / (1024 * 1024)}/${(imageLoader.diskCache?.maxSize ?: 0) / (1024 * 1024)} MB") Log.d("STATE DUMP", "Image Disk Cache ${(imageLoader.diskCache?.size ?: 0) / (1024 * 1024)}/${(imageLoader.diskCache?.maxSize ?: 0) / (1024 * 1024)} MB")
println("Image Memory Cache ${(imageLoader.memoryCache?.size ?: 0) / (1024 * 1024)}/${(imageLoader.memoryCache?.maxSize ?: 0) / (1024 * 1024)} MB") Log.d("STATE DUMP", "Image Memory Cache ${(imageLoader.memoryCache?.size ?: 0) / (1024 * 1024)}/${(imageLoader.memoryCache?.maxSize ?: 0) / (1024 * 1024)} MB")
println("Notes: " + LocalCache.notes.filter { it.value.event != null }.size + "/" + LocalCache.notes.size) Log.d("STATE DUMP", "Notes: " + LocalCache.notes.filter { it.value.event != null }.size + "/" + LocalCache.notes.size)
println("Users: " + LocalCache.users.filter { it.value.info?.latestMetadata != null }.size + "/" + LocalCache.users.size) Log.d("STATE DUMP", "Users: " + LocalCache.users.filter { it.value.info?.latestMetadata != null }.size + "/" + LocalCache.users.size)
} }
) { ) {
Icon( Icon(