diff --git a/data_local/src/main/java/com/example/util/simpletimetracker/data_local/repo/RepoConstants.kt b/data_local/src/main/java/com/example/util/simpletimetracker/data_local/repo/RepoConstants.kt index 6e7192275..c1c856e09 100644 --- a/data_local/src/main/java/com/example/util/simpletimetracker/data_local/repo/RepoConstants.kt +++ b/data_local/src/main/java/com/example/util/simpletimetracker/data_local/repo/RepoConstants.kt @@ -3,5 +3,6 @@ package com.example.util.simpletimetracker.data_local.repo object RepoConstants { const val LOG_MESSAGE_PREFIX = "DB_ACCESS" const val LOG_MESSAGE_PREFS_PREFIX = "PREFS" + const val LOG_MESSAGE_DISK_PREFIX = "DISK" const val LOG_MESSAGE_CACHE = "CACHE" } \ No newline at end of file diff --git a/data_local/src/main/java/com/example/util/simpletimetracker/data_local/utils/PrefsUtils.kt b/data_local/src/main/java/com/example/util/simpletimetracker/data_local/utils/PrefsUtils.kt index 2cdd22e9e..b661dc32a 100644 --- a/data_local/src/main/java/com/example/util/simpletimetracker/data_local/utils/PrefsUtils.kt +++ b/data_local/src/main/java/com/example/util/simpletimetracker/data_local/utils/PrefsUtils.kt @@ -2,6 +2,7 @@ package com.example.util.simpletimetracker.data_local.utils import android.content.SharedPreferences import com.example.util.simpletimetracker.data_local.repo.RepoConstants.LOG_MESSAGE_CACHE +import com.example.util.simpletimetracker.data_local.repo.RepoConstants.LOG_MESSAGE_DISK_PREFIX import com.example.util.simpletimetracker.data_local.repo.RepoConstants.LOG_MESSAGE_PREFIX import com.example.util.simpletimetracker.data_local.repo.RepoConstants.LOG_MESSAGE_PREFS_PREFIX import kotlinx.coroutines.Dispatchers @@ -88,16 +89,24 @@ internal suspend inline fun Mutex.withLockedCache( * Inlined for message tag to be an actual class name at call site. */ @Suppress("NOTHING_TO_INLINE") -internal inline fun logDataAccess(logMessage: String) { +private inline fun logDataAccessInternal(logMessage: String) { Timber.d("$LOG_MESSAGE_PREFIX $logMessage") } +/** + * Inlined for message tag to be an actual class name at call site. + */ +@Suppress("NOTHING_TO_INLINE") +internal inline fun logDataAccess(logMessage: String) { + logDataAccessInternal("$LOG_MESSAGE_DISK_PREFIX $logMessage") +} + /** * Inlined for message tag to be an actual class name at call site. */ @Suppress("NOTHING_TO_INLINE") internal inline fun logPrefsDataAccess(logMessage: String) { - logDataAccess("$LOG_MESSAGE_PREFS_PREFIX $logMessage") + logDataAccessInternal("$LOG_MESSAGE_PREFS_PREFIX $logMessage") } /**