mirror of
https://github.com/openflocon/Flocon.git
synced 2026-05-02 02:50:10 +00:00
feat: [NETWORK] should log (#416)
Co-authored-by: Florent Champigny <florent@bere.al>
This commit is contained in:
parent
fb6e57edcb
commit
829e951019
7 changed files with 46 additions and 9 deletions
|
|
@ -28,7 +28,15 @@ class MainActivity : ComponentActivity() {
|
|||
|
||||
// Initialize Ktor client with Flocon plugin
|
||||
val ktorClient = HttpClient(OkHttp) {
|
||||
install(FloconKtorPlugin)
|
||||
install(FloconKtorPlugin) {
|
||||
/*
|
||||
shouldLog = {
|
||||
val url = it.url.toString()
|
||||
println("url: $url")
|
||||
url.contains("1").not()
|
||||
}
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
||||
// Initialize the HTTP caller
|
||||
|
|
|
|||
|
|
@ -15,7 +15,6 @@ import io.github.openflocon.flocon.myapplication.multi.database.FoodDatabase
|
|||
import io.github.openflocon.flocon.myapplication.multi.database.initializeDatabases
|
||||
import io.github.openflocon.flocon.myapplication.multi.ui.App
|
||||
import io.github.openflocon.flocon.plugins.database.floconRegisterDatabase
|
||||
import io.github.openflocon.flocon.plugins.tables.floconTable
|
||||
import io.ktor.client.HttpClient
|
||||
import io.ktor.client.engine.cio.CIO
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
|
|
@ -29,6 +28,13 @@ fun main() {
|
|||
isImage = {
|
||||
it.request.url.toString().contains("picsum.photos")
|
||||
}
|
||||
/*
|
||||
shouldLog = {
|
||||
val url = it.url.toString()
|
||||
println("url: $url")
|
||||
url.contains("1").not()
|
||||
}
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue