mirror of
https://github.com/square/okhttp.git
synced 2025-11-24 18:41:06 +03:00
Fix kotlin source compatibility with logger (#4927)
* Document broken kotlin source * Fix existing code
This commit is contained in:
committed by
Jesse Wilson
parent
5828ebf9da
commit
b89e9ed5c4
@@ -150,6 +150,8 @@ class LoggingEventListener private constructor(
|
||||
open class Factory @JvmOverloads constructor(
|
||||
private val logger: HttpLoggingInterceptor.Logger = HttpLoggingInterceptor.Logger.DEFAULT
|
||||
) : EventListener.Factory {
|
||||
constructor(block: (string: String) -> Unit): this(HttpLoggingInterceptor.Logger(block))
|
||||
|
||||
override fun create(call: Call): EventListener = LoggingEventListener(logger)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user