Methods Summary |
---|
private void | appendAuthUserName(java.nio.CharBuffer cb, javax.servlet.http.HttpServletRequest hreq)
String user = hreq.getRemoteUser();
if (user == null) {
user = NULL_VALUE;
}
cb.put(user);
|
private void | appendClientId(java.nio.CharBuffer cb, javax.servlet.ServletRequest req)
cb.put(NULL_VALUE); // unsupported
|
private void | appendClientName(java.nio.CharBuffer cb, javax.servlet.ServletRequest req)
String value = req.getRemoteHost();
if (value == null) {
value = NULL_VALUE;
}
cb.put(value);
|
private void | appendCurrentDate(java.nio.CharBuffer cb)
Date date = getDate();
cb.put("[");
cb.put(dayFormatter.format(date)); // Day
cb.put('/");
cb.put(lookup(monthFormatter.format(date))); // Month
cb.put('/");
cb.put(yearFormatter.format(date)); // Year
cb.put(':");
cb.put(timeFormatter.format(date)); // Time
cb.put(SPACE);
cb.put(timeZone); // Time Zone
cb.put("]");
|
public void | appendLogEntry(org.apache.catalina.Request request, org.apache.catalina.Response response, java.nio.CharBuffer charBuffer)Appends an access log entry line, with info obtained from the given
request and response objects, to the given CharBuffer.
ServletRequest req = request.getRequest();
HttpServletRequest hreq = (HttpServletRequest) req;
appendClientName(charBuffer, req);
charBuffer.put(SPACE);
appendClientId(charBuffer, req);
charBuffer.put(SPACE);
appendAuthUserName(charBuffer, hreq);
charBuffer.put(SPACE);
appendCurrentDate(charBuffer);
charBuffer.put(SPACE);
appendRequestInfo(charBuffer, hreq);
charBuffer.put(SPACE);
appendResponseStatus(charBuffer, response);
charBuffer.put(SPACE);
appendResponseLength(charBuffer, response);
charBuffer.put(SPACE);
|
private void | appendRequestInfo(java.nio.CharBuffer cb, javax.servlet.http.HttpServletRequest hreq)
cb.put("\"");
cb.put(hreq.getMethod());
cb.put(SPACE);
cb.put(hreq.getRequestURI());
if (hreq.getQueryString() != null) {
cb.put('?");
cb.put(hreq.getQueryString());
}
cb.put(SPACE);
cb.put(hreq.getProtocol());
cb.put("\"");
|
private void | appendResponseLength(java.nio.CharBuffer cb, org.apache.catalina.Response response)
cb.put("" + response.getContentCount());
|
private void | appendResponseStatus(java.nio.CharBuffer cb, org.apache.catalina.Response response)
cb.put(String.valueOf(((HttpResponse) response).getStatus()));
|