Class LoggingInterceptor
- java.lang.Object
-
- ca.uhn.fhir.rest.client.interceptor.LoggingInterceptor
-
- All Implemented Interfaces:
ca.uhn.fhir.rest.client.api.IClientInterceptor
public class LoggingInterceptor extends Object implements ca.uhn.fhir.rest.client.api.IClientInterceptor
-
-
Constructor Summary
Constructors Constructor Description LoggingInterceptor()Constructor for client logging interceptorLoggingInterceptor(boolean theVerbose)Constructor for client logging interceptor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidinterceptRequest(ca.uhn.fhir.rest.client.api.IHttpRequest theRequest)voidinterceptResponse(ca.uhn.fhir.rest.client.api.IHttpResponse theResponse)voidsetLogger(org.slf4j.Logger theLogger)Sets a logger to use to log messages (default is a logger with this class' name).voidsetLogRequestBody(boolean theValue)Should a summary (one line) for each request be logged, containing the URL and other informationvoidsetLogRequestHeaders(boolean theValue)Should headers for each request be logged, containing the URL and other informationvoidsetLogRequestSummary(boolean theValue)Should a summary (one line) for each request be logged, containing the URL and other informationvoidsetLogResponseBody(boolean theValue)Should a summary (one line) for each request be logged, containing the URL and other informationvoidsetLogResponseHeaders(boolean theValue)Should headers for each request be logged, containing the URL and other informationvoidsetLogResponseSummary(boolean theValue)Should a summary (one line) for each request be logged, containing the URL and other information
-
-
-
Constructor Detail
-
LoggingInterceptor
public LoggingInterceptor()
Constructor for client logging interceptor
-
LoggingInterceptor
public LoggingInterceptor(boolean theVerbose)
Constructor for client logging interceptor- Parameters:
theVerbose- If set to true, all logging is enabled
-
-
Method Detail
-
interceptRequest
public void interceptRequest(ca.uhn.fhir.rest.client.api.IHttpRequest theRequest)
- Specified by:
interceptRequestin interfaceca.uhn.fhir.rest.client.api.IClientInterceptor
-
interceptResponse
public void interceptResponse(ca.uhn.fhir.rest.client.api.IHttpResponse theResponse) throws IOException
- Specified by:
interceptResponsein interfaceca.uhn.fhir.rest.client.api.IClientInterceptor- Throws:
IOException
-
setLogger
public void setLogger(org.slf4j.Logger theLogger)
Sets a logger to use to log messages (default is a logger with this class' name). This can be used to redirect logs to a differently named logger instead.- Parameters:
theLogger- The logger to use. Must not be null.
-
setLogRequestBody
public void setLogRequestBody(boolean theValue)
Should a summary (one line) for each request be logged, containing the URL and other information
-
setLogRequestHeaders
public void setLogRequestHeaders(boolean theValue)
Should headers for each request be logged, containing the URL and other information
-
setLogRequestSummary
public void setLogRequestSummary(boolean theValue)
Should a summary (one line) for each request be logged, containing the URL and other information
-
setLogResponseBody
public void setLogResponseBody(boolean theValue)
Should a summary (one line) for each request be logged, containing the URL and other information
-
setLogResponseHeaders
public void setLogResponseHeaders(boolean theValue)
Should headers for each request be logged, containing the URL and other information
-
setLogResponseSummary
public void setLogResponseSummary(boolean theValue)
Should a summary (one line) for each request be logged, containing the URL and other information
-
-