All Downloads are FREE. Search and download functionalities are using the official Maven repository.

gecko.GeckoLogging.kt Maven / Gradle / Ivy

Go to download

Full network logging allowing users to browse entire calls via simple urls and more.

There is a newer version: 0.0.6
Show newest version
package gecko

import gecko.model.NetworkMetadata
import gecko.model.Tail
import gecko.model.asString

class GeckoLogging(
    private val source: Gecko,
    private val logger: Logger
) : Gecko {

    override fun process(metadata: NetworkMetadata): Tail {
        return source.process(metadata).also {
            val method = metadata.request.method
            val url = metadata.request.url
            val code = metadata.response.code
            logger.log("-> $method | $code | $url")
            logger.log(it.asString())
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy