APISonar


org.eclipse.jetty.server.RequestLog.log

> org > eclipse > jetty > server > RequestLog > log
org APIs eclipse APIs jetty APIs server APIs RequestLog APIs log APIs

Example 1
private final RequestLog                         requestLog;

  private void handleRequest(WebSocketRequestMessage requestMessage) {
    try {
      HttpServletRequest  servletRequest  = createRequest(requestMessage, context);
      HttpServletResponse servletResponse = createResponse(requestMessage);

      servlet.service(servletRequest, servletResponse);
      servletResponse.flushBuffer();
      requestLog.log(new LoggableRequest(servletRequest), new LoggableResponse(servletResponse));
    } catch (IOException | ServletException e) {
      logger.warn("Servlet Error: " + requestMessage.getVerb() + " " + requestMessage.getPath() + "\n" + requestMessage.getBody(), e);
      sendErrorResponse(requestMessage, Response.status(500).build());
    }
  }