gecko.GeckoLogging.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of gecko-core Show documentation
Show all versions of gecko-core Show documentation
Full network logging allowing users to browse entire calls via simple urls and more.
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