/** * Receive notification of the completion of a {@link Response} an possibly * trigger an access log entry generation. */ @Override @SuppressWarnings("rawtypes") public void onRequestCompleteEvent(HttpServerFilter filter, Connection connection, Response response) { /* Only call the format/appender if we have to */ if (response.getStatus() < statusThreshold) return; /* Calculate request timing */ final Long requestNanos = (Long) response.getRequest().getAttribute(ATTRIBUTE_TIME_STAMP); final long timeStamp = System.currentTimeMillis(); final long nanoStamp = System.nanoTime(); final long responseNanos = requestNanos == null ? -1 : nanoStamp - requestNanos; final Date requestMillis = new Date(timeStamp - (responseNanos / 1000000L)); /* Create a formatted log entry string and append it */ try { appender.append(format.format(response, requestMillis, responseNanos)); } catch (Throwable throwable) { LOGGER.log(WARNING, "Exception caught appending to access log", throwable); } }
/** * Receive notification of the completion of a {@link Response} an possibly * trigger an access log entry generation. */ @Override @SuppressWarnings("rawtypes") public void onRequestCompleteEvent(HttpServerFilter filter, Connection connection, Response response) { /* Only call the format/appender if we have to */ if (response.getStatus() < statusThreshold) return; /* Calculate request timing */ final Long requestNanos = (Long) response.getRequest().getAttribute(ATTRIBUTE_TIME_STAMP); final long timeStamp = System.currentTimeMillis(); final long nanoStamp = System.nanoTime(); final long responseNanos = requestNanos == null ? -1 : nanoStamp - requestNanos; final Date requestMillis = new Date(timeStamp - (responseNanos / 1000000L)); /* Create a formatted log entry string and append it */ try { appender.append(format.format(response, requestMillis, responseNanos)); } catch (Throwable throwable) { LOGGER.log(WARNING, "Exception caught appending to access log", throwable); } }
/** * Receive notification of the completion of a {@link Response} an possibly * trigger an access log entry generation. */ @Override @SuppressWarnings("rawtypes") public void onRequestCompleteEvent(HttpServerFilter filter, Connection connection, Response response) { /* Only call the format/appender if we have to */ if (response.getStatus() < statusThreshold) return; /* Calculate request timing */ final Long requestNanos = (Long) response.getRequest().getAttribute(ATTRIBUTE_TIME_STAMP); final long timeStamp = System.currentTimeMillis(); final long nanoStamp = System.nanoTime(); final long responseNanos = requestNanos == null ? -1 : nanoStamp - requestNanos; final Date requestMillis = new Date(timeStamp - (responseNanos / 1000000L)); /* Create a formatted log entry string and append it */ try { appender.append(format.format(response, requestMillis, responseNanos)); } catch (Throwable throwable) { LOGGER.log(WARNING, "Exception caught appending to access log", throwable); } }
/** * Receive notification of the completion of a {@link Response} an possibly * trigger an access log entry generation. */ @Override @SuppressWarnings("rawtypes") public void onRequestCompleteEvent(HttpServerFilter filter, Connection connection, Response response) { /* Only call the format/appender if we have to */ if (response.getStatus() < statusThreshold) return; /* Calculate request timing */ final Long requestNanos = (Long) response.getRequest().getAttribute(ATTRIBUTE_TIME_STAMP); final long timeStamp = System.currentTimeMillis(); final long nanoStamp = System.nanoTime(); final long responseNanos = requestNanos == null ? -1 : nanoStamp - requestNanos; final Date requestMillis = new Date(timeStamp - (responseNanos / 1000000L)); /* Create a formatted log entry string and append it */ try { appender.append(format.format(response, requestMillis, responseNanos)); } catch (Throwable throwable) { LOGGER.log(WARNING, "Exception caught appending to access log", throwable); } }
/** * Receive notification of the completion of a {@link Response} an possibly * trigger an access log entry generation. */ @Override @SuppressWarnings("rawtypes") public void onRequestCompleteEvent(HttpServerFilter filter, Connection connection, Response response) { /* Only call the format/appender if we have to */ if (response.getStatus() < statusThreshold) return; /* Calculate request timing */ final Long requestNanos = (Long) response.getRequest().getAttribute(ATTRIBUTE_TIME_STAMP); final long timeStamp = System.currentTimeMillis(); final long nanoStamp = System.nanoTime(); final long responseNanos = requestNanos == null ? -1 : nanoStamp - requestNanos; final Date requestMillis = new Date(timeStamp - (responseNanos / 1000000L)); /* Create a formatted log entry string and append it */ try { appender.append(format.format(response, requestMillis, responseNanos)); } catch (Throwable throwable) { LOGGER.log(WARNING, "Exception caught appending to access log", throwable); } }
/** * Receive notification of the completion of a {@link Response} an possibly * trigger an access log entry generation. */ @Override @SuppressWarnings("rawtypes") public void onRequestCompleteEvent(HttpServerFilter filter, Connection connection, Response response) { /* Only call the format/appender if we have to */ if (response.getStatus() < statusThreshold) return; /* Calculate request timing */ final Long requestNanos = (Long) response.getRequest().getAttribute(ATTRIBUTE_TIME_STAMP); final long timeStamp = System.currentTimeMillis(); final long nanoStamp = System.nanoTime(); final long responseNanos = requestNanos == null ? -1 : nanoStamp - requestNanos; final Date requestMillis = new Date(timeStamp - (responseNanos / 1000000L)); /* Create a formatted log entry string and append it */ try { appender.append(format.format(response, requestMillis, responseNanos)); } catch (Throwable throwable) { LOGGER.log(WARNING, "Exception caught appending to access log", throwable); } }
/** * Receive notification of the completion of a {@link Response} an possibly * trigger an access log entry generation. */ @Override @SuppressWarnings("rawtypes") public void onRequestCompleteEvent(HttpServerFilter filter, Connection connection, Response response) { /* Only call the format/appender if we have to */ if (response.getStatus() < statusThreshold) return; /* Calculate request timing */ final Long requestNanos = (Long) response.getRequest().getAttribute(ATTRIBUTE_TIME_STAMP); final long timeStamp = System.currentTimeMillis(); final long nanoStamp = System.nanoTime(); final long responseNanos = requestNanos == null ? -1 : nanoStamp - requestNanos; final Date requestMillis = new Date(timeStamp - (responseNanos / 1000000L)); /* Create a formatted log entry string and append it */ try { appender.append(format.format(response, requestMillis, responseNanos)); } catch (Throwable throwable) { LOGGER.log(WARNING, "Exception caught appending to access log", throwable); } }
/** * Receive notification of the completion of a {@link Response} an possibly * trigger an access log entry generation. */ @Override @SuppressWarnings("rawtypes") public void onRequestCompleteEvent(HttpServerFilter filter, Connection connection, Response response) { /* Only call the format/appender if we have to */ if (response.getStatus() < statusThreshold) return; /* Calculate request timing */ final Long requestNanos = (Long) response.getRequest().getAttribute(ATTRIBUTE_TIME_STAMP); final long timeStamp = System.currentTimeMillis(); final long nanoStamp = System.nanoTime(); final long responseNanos = requestNanos == null ? -1 : nanoStamp - requestNanos; final Date requestMillis = new Date(timeStamp - (responseNanos / 1000000L)); /* Create a formatted log entry string and append it */ try { appender.append(format.format(response, requestMillis, responseNanos)); } catch (Throwable throwable) { LOGGER.log(WARNING, "Exception caught appending to access log", throwable); } }
/** * Receive notification of the completion of a {@link Response} an possibly * trigger an access log entry generation. */ @Override @SuppressWarnings("rawtypes") public void onRequestCompleteEvent(HttpServerFilter filter, Connection connection, Response response) { /* Only call the format/appender if we have to */ if (response.getStatus() < statusThreshold) return; /* Calculate request timing */ final Long requestNanos = (Long) response.getRequest().getAttribute(ATTRIBUTE_TIME_STAMP); final long timeStamp = System.currentTimeMillis(); final long nanoStamp = System.nanoTime(); final long responseNanos = requestNanos == null ? -1 : nanoStamp - requestNanos; final Date requestMillis = new Date(timeStamp - (responseNanos / 1000000L)); /* Create a formatted log entry string and append it */ try { appender.append(format.format(response, requestMillis, responseNanos)); } catch (Throwable throwable) { LOGGER.log(WARNING, "Exception caught appending to access log", throwable); } }
/** * Receive notification of the completion of a {@link Response} an possibly * trigger an access log entry generation. */ @Override @SuppressWarnings("rawtypes") public void onRequestCompleteEvent(HttpServerFilter filter, Connection connection, Response response) { /* Only call the format/appender if we have to */ if (response.getStatus() < statusThreshold) return; /* Calculate request timing */ final Long requestNanos = (Long) response.getRequest().getAttribute(ATTRIBUTE_TIME_STAMP); final long timeStamp = System.currentTimeMillis(); final long nanoStamp = System.nanoTime(); final long responseNanos = requestNanos == null ? -1 : nanoStamp - requestNanos; final Date requestMillis = new Date(timeStamp - (responseNanos / 1000000L)); /* Create a formatted log entry string and append it */ try { appender.append(format.format(response, requestMillis, responseNanos)); } catch (Throwable throwable) { LOGGER.log(WARNING, "Exception caught appending to access log", throwable); } }
/** * Receive notification of the completion of a {@link Response} an possibly * trigger an access log entry generation. */ @Override @SuppressWarnings("rawtypes") public void onRequestCompleteEvent(HttpServerFilter filter, Connection connection, Response response) { /* Only call the format/appender if we have to */ if (response.getStatus() < statusThreshold) return; /* Calculate request timing */ final Long requestNanos = (Long) response.getRequest().getAttribute(ATTRIBUTE_TIME_STAMP); final long timeStamp = System.currentTimeMillis(); final long nanoStamp = System.nanoTime(); final long responseNanos = requestNanos == null ? -1 : nanoStamp - requestNanos; final Date requestMillis = new Date(timeStamp - (responseNanos / 1000000L)); /* Create a formatted log entry string and append it */ try { appender.append(format.format(response, requestMillis, responseNanos)); } catch (Throwable throwable) { LOGGER.log(WARNING, "Exception caught appending to access log", throwable); } }