CombinedAccessLogFormatterImplpublic class CombinedAccessLogFormatterImpl extends CommonAccessLogFormatterImpl Access log formatter using the combined access log format from
Apache. |
Methods Summary |
---|
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.
super.appendLogEntry(request, response, charBuffer);
ServletRequest req = request.getRequest();
HttpServletRequest hreq = (HttpServletRequest) req;
appendReferer(charBuffer, hreq);
charBuffer.put(SPACE);
appendUserAgent(charBuffer, hreq);
| private void | appendReferer(java.nio.CharBuffer cb, javax.servlet.http.HttpServletRequest hreq)
cb.put("\"");
String referer = hreq.getHeader("referer");
if (referer == null) {
referer = NULL_VALUE;
}
cb.put(referer);
cb.put("\"");
| private void | appendUserAgent(java.nio.CharBuffer cb, javax.servlet.http.HttpServletRequest hreq)
cb.put("\"");
String ua = hreq.getHeader("user-agent");
if (ua == null) {
ua = NULL_VALUE;
}
cb.put(ua);
cb.put("\"");
|
|