public final class HttpLoggingInterceptor extends Object implements okhttp3.Interceptor
The format of the logs created by this class should not be considered stable and may change slightly between releases. If you need a stable logging format, use your own interceptor.
| 限定符和类型 | 类和说明 |
|---|---|
static class |
HttpLoggingInterceptor.Level |
static interface |
HttpLoggingInterceptor.Logger |
| 构造器和说明 |
|---|
HttpLoggingInterceptor() |
HttpLoggingInterceptor(HttpLoggingInterceptor.Logger logger) |
| 限定符和类型 | 方法和说明 |
|---|---|
HttpLoggingInterceptor.Level |
getLevel() |
okhttp3.Response |
intercept(okhttp3.Interceptor.Chain chain) |
HttpLoggingInterceptor |
setLevel(HttpLoggingInterceptor.Level level)
Change the level at which this interceptor logs.
|
public HttpLoggingInterceptor()
public HttpLoggingInterceptor(HttpLoggingInterceptor.Logger logger)
public HttpLoggingInterceptor.Level getLevel()
public HttpLoggingInterceptor setLevel(HttpLoggingInterceptor.Level level)
level - log Levelpublic okhttp3.Response intercept(okhttp3.Interceptor.Chain chain)
throws IOException
intercept 在接口中 okhttp3.InterceptorIOExceptionCopyright © 2020. All rights reserved.