public class LogInterceptor extends Object implements okhttp3.Interceptor
| Constructor and Description |
|---|
LogInterceptor(Logger logger)
Creates a LogInterceptor, taking a logger to be logged to, once a request comes in.
|
| Modifier and Type | Method and Description |
|---|---|
okhttp3.Response |
intercept(okhttp3.Interceptor.Chain chain)
Log the incoming request.
|
public LogInterceptor(Logger logger)
logger - a nonnull logger to be used.IllegalArgumentException - if a null logger was given.public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain)
throws IOException
intercept in interface okhttp3.Interceptorchain - the chain of interceptor, provided by the okhttp3IOException - if an error happened in the chain.Copyright © 2017 Contentful, GmbH.. All Rights Reserved.