Skip to content

Commit

Permalink
[#3459] Add logging to persistence layer
Browse files Browse the repository at this point in the history
  • Loading branch information
mustafaozhan committed May 20, 2024
1 parent a256677 commit f177989
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ internal class PersistenceImpl(private val settings: Settings) : Persistence {
is Boolean -> settings.getBoolean(key, defaultValue) as T
is Float -> settings.getFloat(key, defaultValue) as T
else -> throw UnsupportedPersistenceException().also {
Logger.e { "Unsupported type: ${defaultValue::class} for key $key and default value $defaultValue" }
Logger.e(it) { "Unsupported type: ${defaultValue::class} for key $key and default value $defaultValue" }
}
}

Expand All @@ -24,7 +24,7 @@ internal class PersistenceImpl(private val settings: Settings) : Persistence {
is Boolean -> settings.putBoolean(key, value)
is Float -> settings.putFloat(key, value)
else -> throw UnsupportedPersistenceException().also {
Logger.e { "Unsupported type: ${value::class} for key $key and value $value" }
Logger.e(it) { "Unsupported type: ${value::class} for key $key and value $value" }
}
}
}

0 comments on commit f177989

Please sign in to comment.