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
ConstructorDescriptionRESTCallLogger
(org.slf4j.Logger log, String serviceName) Create a REST Call logger for a REST Service. -
Method Summary
Modifier and TypeMethodDescriptionlogRESTCall
(String serverName, String methodName) Log the start of an inbound REST Call.logRESTCall
(String serverName, String userId, String methodName) Log the start of an inbound REST Call.void
logRESTCallReturn
(RESTCallToken token, String response) Log the return of an inbound REST Call.void
setUserId
(RESTCallToken token, String userId) Allow the userId to be added retrospectively
-
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
-
logRESTCall
Log the start of an inbound REST Call.- Parameters:
serverName
- destination servermethodName
- called method- Returns:
- stop watch measuring the call execution length
-
setUserId
Allow the userId to be added retrospectively- Parameters:
token
- REST call tokenuserId
- calling user
-
logRESTCallReturn
Log the return of an inbound REST Call.- Parameters:
token
- REST call tokenresponse
- result of call
-