private function onRequestComplete(RequestInterface $request, ResponseInterface $response)
    {
        $hash = $this->hash($request);
        // Send the log message to the adapter, adding a category and host
        $priority = $response && $this->isError($response) ? LOG_ERR : LOG_DEBUG;
        $message = $this->formatter->format($request, $response);
        $event = $this->stopwatch->stop($hash);
        $this->logAdapter->log($message, $priority, array(
            'request'  => $request,
            'response' => $response,
            'time'     => $event->getDuration(),
        ));
    }