Skip to content

Commit

Permalink
add toggle for network logger
Browse files Browse the repository at this point in the history
  • Loading branch information
aleksandrMasliaev committed Feb 17, 2025
1 parent 9ebb6c2 commit 06e43f9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main/kotlin/marge_kot/data/Repository.kt
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,10 @@ private fun createClient(token: String): HttpClient {
}
)
}
install(plugin = Logging, configure = LoggingConfig::configureLogger)
val debuggable = System.getenv("MARGE_KOT_ADD_REQUEST_LOGS").toBoolean()
if (debuggable) {
install(plugin = Logging, configure = LoggingConfig::configureLogger)
}
install(HttpRequestRetry) {
retryOnException(maxRetries = 5)
exponentialDelay()
Expand Down

0 comments on commit 06e43f9

Please sign in to comment.