Class RESTCallLogger
java.lang.Object
org.odpi.openmetadata.commonservices.ffdc.RESTCallLogger
RESTCallLogger provides standard logging for REST API method invocations. It logs
the start and end of the call and manages a timer so that the elapsed time of a call is logged.
-
Constructor Summary
ConstructorsConstructorDescriptionRESTCallLogger(org.slf4j.Logger log, String serviceName) Create a REST Call logger for a REST Service. -
Method Summary
Modifier and TypeMethodDescriptionlogRESTCall(String serverName, String userId, String methodName) Log the start of an inbound REST Call.voidlogRESTCallReturn(RESTCallToken token, String response) Log the return of an inbound REST Call.
-
Constructor Details
-
RESTCallLogger
Create a REST Call logger for a REST Service.- Parameters:
log- debug loggerserviceName- service name
-
-
Method Details
-
logRESTCall
Log the start of an inbound REST Call.- Parameters:
serverName- destination serveruserId- calling usermethodName- called method- Returns:
- stop watch measuring the call execution length
-
logRESTCallReturn
Log the return of an inbound REST Call.- Parameters:
token- REST call tokenresponse- result of call
-