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 Constructor Description SLF4JInterceptor()SLF4JInterceptor(DetailLevel detailLevel)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DetailLevelgetDetailLevel()voidprocess(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 Detail
-
SLF4JInterceptor
public SLF4JInterceptor()
-
SLF4JInterceptor
public SLF4JInterceptor(DetailLevel detailLevel)
-
-
Method Detail
-
getDetailLevel
public DetailLevel getDetailLevel()
- Returns:
- the current detail level of the filter
-
setDetailLevel
public void setDetailLevel(DetailLevel detailLevel)
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
-
-