Class RESTCallLogger
- java.lang.Object
-
- org.odpi.openmetadata.commonservices.ffdc.RESTCallLogger
-
public class RESTCallLogger extends Object
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
Constructors Constructor Description RESTCallLogger(org.slf4j.Logger log, String serviceName)Create a REST Call logger for a REST Service.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RESTCallTokenlogRESTCall(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 Detail
-
RESTCallLogger
public RESTCallLogger(org.slf4j.Logger log, String serviceName)Create a REST Call logger for a REST Service.- Parameters:
log- debug loggerserviceName- service name
-
-
Method Detail
-
logRESTCall
public RESTCallToken logRESTCall(String serverName, String userId, String methodName)
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
public void logRESTCallReturn(RESTCallToken token, String response)
Log the return of an inbound REST Call.- Parameters:
token- REST call tokenresponse- result of call
-
-