Merge pull request #5209 from vector-im/michaelk/reduce_debug_logging_loop

Reduce verbosity of CleanupSession debug logs.
This commit is contained in:
Adam Brown 2022-02-11 16:28:26 +00:00 committed by GitHub
commit d19e6d290f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

1
changelog.d/5209.misc Normal file
View File

@ -0,0 +1 @@
Reduce verbosity of debug logging,

View File

@ -94,12 +94,12 @@ internal class CleanupSession @Inject constructor(
do {
val sessionRealmCount = Realm.getGlobalInstanceCount(realmSessionConfiguration)
val cryptoRealmCount = Realm.getGlobalInstanceCount(realmCryptoConfiguration)
Timber.d("Wait for all Realm instance to be closed ($sessionRealmCount - $cryptoRealmCount)")
if (sessionRealmCount > 0 || cryptoRealmCount > 0) {
Timber.d("Waiting ${TIME_TO_WAIT_MILLIS}ms")
Timber.d("Waiting ${TIME_TO_WAIT_MILLIS}ms for all Realm instance to be closed ($sessionRealmCount - $cryptoRealmCount)")
delay(TIME_TO_WAIT_MILLIS)
timeToWaitMillis -= TIME_TO_WAIT_MILLIS
} else {
Timber.d("Finished waiting for all Realm instance to be closed ($sessionRealmCount - $cryptoRealmCount)")
timeToWaitMillis = 0
}
} while (timeToWaitMillis > 0)