public final class HttpLoggingInterceptor extends java.lang.Object implements 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.
Modifier and Type | Class and Description |
---|---|
static class |
HttpLoggingInterceptor.Level |
static interface |
HttpLoggingInterceptor.Logger |
Interceptor.Chain
Constructor and Description |
---|
HttpLoggingInterceptor() |
HttpLoggingInterceptor(HttpLoggingInterceptor.Logger logger) |
Modifier and Type | Method and Description |
---|---|
HttpLoggingInterceptor.Level |
getLevel() |
Response |
intercept(Interceptor.Chain chain) |
void |
redactHeader(java.lang.String name) |
HttpLoggingInterceptor |
setLevel(HttpLoggingInterceptor.Level level)
Change the level at which this interceptor logs.
|
public HttpLoggingInterceptor()
public HttpLoggingInterceptor(HttpLoggingInterceptor.Logger logger)
public void redactHeader(java.lang.String name)
public HttpLoggingInterceptor setLevel(HttpLoggingInterceptor.Level level)
public HttpLoggingInterceptor.Level getLevel()
public Response intercept(Interceptor.Chain chain) throws java.io.IOException
intercept
in interface Interceptor
java.io.IOException
Copyright © 2019. All Rights Reserved.