Class HttpLoggingInterceptor
Object
ch.aaap.harvestclient.vendor.okhttp.HttpLoggingInterceptor
- All Implemented Interfaces:
okhttp3.Interceptor
An OkHttp interceptor which logs request and response information. Can be
applied as an application
interceptor or as a network
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.
This custom version redacts security sensitive headers like "Authorization"
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
static interface
Nested classes/interfaces inherited from interface okhttp3.Interceptor
okhttp3.Interceptor.Chain
-
Constructor Summary
ConstructorsConstructorDescription -
Method Summary
-
Constructor Details
-
HttpLoggingInterceptor
public HttpLoggingInterceptor() -
HttpLoggingInterceptor
-
-
Method Details
-
setLevel
Change the level at which this interceptor logs.- Parameters:
level
- new logging Level- Returns:
- this
-
getLevel
-
intercept
- Specified by:
intercept
in interfaceokhttp3.Interceptor
- Throws:
IOException
-