https://kotlinlang.org logo
#ktor
Title
# ktor
j

Jeff Tycz

03/03/2021, 1:43 AM
When trying to use the Ktor Logging plugin on a multiplatform client where do the logs show? I dont see any log messages in the logcat in Android Studio, I want to see my http requests for debugging. I have it setup just as shown in the docs
Copy code
private val _client: HttpClient = HttpClient(engine) {
    install(JsonFeature) {
        val json = kotlinx.serialization.json.Json {
            this.isLenient = true
            this.ignoreUnknownKeys = true
        }
        serializer = KotlinxSerializer(json)
    }
    install(Logging) {
        logger = Logger.DEFAULT
        level = LogLevel.ALL
    }
}
w

william

03/03/2021, 2:37 AM
did you add the logging dependency?
io.ktor:ktor-client-logging-jvm:...
or similar?
3 Views