LoggingInterceptor Class
- java.
lang. Object - com.
microsoft. bot. restclient. interceptors. LoggingInterceptor
- com.
Implements
public class LoggingInterceptor
implements okhttp3.Interceptor
An OkHttp interceptor that handles logging of HTTP requests and responses.
Constructor Summary
| Constructor | Description |
|---|---|
| LoggingInterceptor(LogLevel logLevel) |
Creates an interceptor with a Log |
Method Summary
| Modifier and Type | Method and Description |
|---|---|
| okhttp3.Response | intercept(Interceptor.Chain chain) |
| protected void |
log(Logger logger, String s)
Process the log using an SLF4j logger and an HTTP message. |
|
Log |
logLevel() |
|
Logging |
withLogLevel(LogLevel logLevel)
Sets the current logging level. |
Methods inherited from java.lang.Object
Constructor Details
LoggingInterceptor
public LoggingInterceptor(LogLevel logLevel)
Creates an interceptor with a LogLevel enum.
Parameters:
Method Details
intercept
public Response intercept(Interceptor.Chain chain)
Parameters:
Throws:
log
protected void log(Logger logger, String s)
Process the log using an SLF4j logger and an HTTP message.
Parameters:
logLevel
public LogLevel logLevel()
Returns:
withLogLevel
public LoggingInterceptor withLogLevel(LogLevel logLevel)
Sets the current logging level.
Parameters:
Returns: