Class SLF4JInterceptor
java.lang.Object
cloud.genesys.webmessaging.sdk.connector.apache.SLF4JInterceptor
- All Implemented Interfaces:
org.apache.http.HttpRequestInterceptor,org.apache.http.HttpResponseInterceptor
public class SLF4JInterceptor
extends Object
implements org.apache.http.HttpRequestInterceptor, org.apache.http.HttpResponseInterceptor
A filter that logs both requests and responses to SLF4J.
Available detail levels
NONE - don't log anything
MINIMAL - only log the verb, url, and response code
HEADERS - as above, but also log all the headers for both the request and response
FULL - as above, but also log the full body for both the request and response
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidprocess(org.apache.http.HttpRequest request, org.apache.http.protocol.HttpContext context) voidprocess(org.apache.http.HttpResponse response, org.apache.http.protocol.HttpContext context) voidsetDetailLevel(DetailLevel detailLevel) Sets the detail level
-
Constructor Details
-
SLF4JInterceptor
public SLF4JInterceptor() -
SLF4JInterceptor
-
-
Method Details
-
getDetailLevel
- Returns:
- the current detail level of the filter
-
setDetailLevel
Sets the detail level- Parameters:
detailLevel- - the new detail level to use
-
process
public void process(org.apache.http.HttpRequest request, org.apache.http.protocol.HttpContext context) throws org.apache.http.HttpException, IOException - Specified by:
processin interfaceorg.apache.http.HttpRequestInterceptor- Throws:
org.apache.http.HttpExceptionIOException
-
process
public void process(org.apache.http.HttpResponse response, org.apache.http.protocol.HttpContext context) throws org.apache.http.HttpException, IOException - Specified by:
processin interfaceorg.apache.http.HttpResponseInterceptor- Throws:
org.apache.http.HttpExceptionIOException
-