I have ktor client in an Android codebase. I have a single apiclient = HttpClient(okhttp) with multiple install() like install(logging). How can I turn logging on and off with a variable passed to apiclient. Like apiclient(true).post(url), thanks
i
ishitatsuyuki
03/01/2022, 1:44 AM
I think an easy way is to use two different clients, one with logging and one without. For anything more complicated you might want to write your own version of logging plugin