public class AccessLogHandler extends Object implements HttpHandler
AccessLogReceiver
.
This handler can log any attribute that is provides via the ExchangeAttribute
mechanism. A general guide to the most common attribute is provided before, however this mechanism is extensible.
This factory produces token handlers for the following patterns
In addition, the caller can specify one of the following aliases for commonly utilized patterns:
%h %l %u %t "%r" %s %b
%h %l %u %t "%r" %s %b "%{i,Referer}" "%{i,User-Agent}"
There is also support to write information from the cookie, incoming
header, or the session
It is modeled after the apache syntax:
%{i,xxx}
for incoming headers
%{o,xxx}
for outgoing response headers
%{c,xxx}
for a specific cookie
%{r,xxx}
xxx is an attribute in the ServletRequest
%{s,xxx}
xxx is an attribute in the HttpSession
Constructor and Description |
---|
AccessLogHandler(HttpHandler next,
AccessLogReceiver accessLogReceiver,
String formatString,
ClassLoader classLoader) |
public AccessLogHandler(HttpHandler next, AccessLogReceiver accessLogReceiver, String formatString, ClassLoader classLoader)
public void handleRequest(HttpServerExchange exchange) throws Exception
HttpHandler
handleRequest
in interface HttpHandler
exchange
- the HTTP request/response exchangeException
Copyright © 2014 JBoss by Red Hat. All rights reserved.