Skip to content

Commit ff48392

Browse files
committed
use logger instead of println
1 parent a4a773c commit ff48392

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

kotlin-insight-client/kotlin-insight-client-test-base/src/main/kotlin/com/linkedplanet/kotlininsightclient/AuthenticatedJiraHttpClientFactory.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import arrow.core.Either
2323
import arrow.core.right
2424
import com.google.gson.Gson
2525
import com.linkedplanet.kotlininsightclient.api.error.InsightClientError
26+
import com.sun.org.slf4j.internal.LoggerFactory
2627
import org.http4k.client.Java8HttpClient
2728
import org.http4k.core.Body
2829
import org.http4k.core.HttpHandler
@@ -45,6 +46,7 @@ class AuthenticatedJiraHttpClientFactory(
4546
companion object {
4647
data class Credentials(val username: String, val password: String)
4748
}
49+
private val log = LoggerFactory.getLogger(this::class.java)
4850

4951
private val storage: CookieStorage = BasicCookieStorage() // this is just a HashMap
5052
private val httpHandler: HttpHandler = ClientFilters.Cookies(storage = storage).then(Java8HttpClient())
@@ -59,7 +61,7 @@ class AuthenticatedJiraHttpClientFactory(
5961
.body(Body(body))
6062
val loginResponse = httpHandler(request)
6163
if (loginResponse.status != Status.OK) {
62-
println("Continue despite 'session' login failing with HTTP StatusCode:${loginResponse.status.code}")
64+
log.debug("Continue despite 'session' login failing with HTTP StatusCode:${loginResponse.status.code}")
6365
}
6466
val privateHandler = object : AuthenticatedHttpHandler, HttpHandler by httpHandler {
6567
override fun getWithRelativePath(path: String): Response {

0 commit comments

Comments
 (0)