We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a076668 commit acf8db1Copy full SHA for acf8db1
shared/src/commonMain/kotlin/dev/suresh/http/CurlLogging.kt
@@ -0,0 +1,19 @@
1
+package dev.suresh.http
2
+
3
+import io.github.oshai.kotlinlogging.KLogger
4
+import io.ktor.client.plugins.api.ClientPlugin
5
+import io.ktor.client.plugins.api.createClientPlugin
6
7
+class CurlLoggingConfig {
8
+ var enabled: Boolean = true
9
+ var logger: KLogger? = null
10
+}
11
12
+val CurlLogging: ClientPlugin<CurlLoggingConfig> =
13
+ createClientPlugin(name = "CurlLogging", createConfiguration = ::CurlLoggingConfig) {
14
+ if (pluginConfig.enabled) {
15
+ onRequest { req, _ ->
16
+ // pluginConfig.logger.is
17
+ }
18
19
0 commit comments