File tree 1 file changed +22
-0
lines changed
1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -129,6 +129,26 @@ class MyApplication : Application() {
129
129
}
130
130
```
131
131
132
+ ## Ktor integration
133
+
134
+ Ktor supports [ providing a custom logger] [ ktor-logging ] :
135
+
136
+ ``` kotlin
137
+ import io.ktor.client.*
138
+ import io.ktor.client.engine.cio.*
139
+ import io.ktor.client.plugins.logging.*
140
+ import saschpe.log4k.Log
141
+
142
+ val httpClient = HttpClient (CIO ) {
143
+ install(Logging ) {
144
+ level = LogLevel .ALL
145
+ logger = object : Logger {
146
+ override fun log (message : String ) = Log .info { message }
147
+ }
148
+ }
149
+ }
150
+ ```
151
+
132
152
## Users
133
153
134
154
- [ Alpha+ Player - Unofficial player for Soma FM] ( https://play.google.com/store/apps/details?id=saschpe.alphaplus )
@@ -150,4 +170,6 @@ class MyApplication : Application() {
150
170
See the License for the specific language governing permissions and
151
171
limitations under the License.
152
172
173
+ [ ktor-logging ] : https://ktor.io/docs/client-logging.html#custom_logger
174
+
153
175
[ maven-central ] : https://search.maven.org/artifact/de.peilicke.sascha/android-customtabs
You can’t perform that action at this time.
0 commit comments