Class HttpLoggingInterceptor
- java.lang.Object
-
- io.getstream.chat.java.services.framework.HttpLoggingInterceptor
-
- All Implemented Interfaces:
okhttp3.Interceptor
public final class HttpLoggingInterceptor extends java.lang.Object implements 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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
HttpLoggingInterceptor.Level
static interface
HttpLoggingInterceptor.Logger
-
Constructor Summary
Constructors Constructor Description HttpLoggingInterceptor()
HttpLoggingInterceptor(HttpLoggingInterceptor.Logger logger)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HttpLoggingInterceptor.Level
getLevel()
okhttp3.Response
intercept(okhttp3.Interceptor.Chain chain)
HttpLoggingInterceptor
setLevel(HttpLoggingInterceptor.Level level)
Change the level at which this interceptor logs.
-
-
-
Constructor Detail
-
HttpLoggingInterceptor
public HttpLoggingInterceptor()
-
HttpLoggingInterceptor
public HttpLoggingInterceptor(HttpLoggingInterceptor.Logger logger)
-
-
Method Detail
-
setLevel
public HttpLoggingInterceptor setLevel(HttpLoggingInterceptor.Level level)
Change the level at which this interceptor logs.
-
getLevel
public HttpLoggingInterceptor.Level getLevel()
-
intercept
public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws java.io.IOException
- Specified by:
intercept
in interfaceokhttp3.Interceptor
- Throws:
java.io.IOException
-
-