Class 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 Detail

      • RESTCallLogger

        public RESTCallLogger​(org.slf4j.Logger log,
                              String serviceName)
        Create a REST Call logger for a REST Service.
        Parameters:
        log - debug logger
        serviceName - 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 server
        userId - calling user
        methodName - 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 token
        response - result of call