public abstract class LoggingRequestHandler extends ThreadedHttpRequestHandler
Modifier and Type | Class and Description |
---|---|
private class |
LoggingRequestHandler.LoggingHandler |
private static class |
LoggingRequestHandler.NullResponse |
ThreadedHttpRequestHandler.LazyContentChannel
Modifier and Type | Field and Description |
---|---|
private com.yahoo.container.logging.AccessLog |
accessLog |
CONTENT_TYPE, DATE, log
metric
Constructor and Description |
---|
LoggingRequestHandler(Executor executor,
com.yahoo.container.logging.AccessLog accessLog) |
LoggingRequestHandler(Executor executor,
com.yahoo.container.logging.AccessLog accessLog,
com.yahoo.jdisc.Metric metric) |
LoggingRequestHandler(Executor executor,
com.yahoo.container.logging.AccessLog accessLog,
com.yahoo.jdisc.Metric metric,
boolean allowAsyncResponse) |
Modifier and Type | Method and Description |
---|---|
protected LoggingCompletionHandler |
createLoggingCompletionHandler(long startTime,
long renderStartTime,
HttpResponse response,
HttpRequest httpRequest,
ContentChannelOutputStream rendererWiring)
Override this to implement custom access logging.
|
private static String |
getClientIP(com.yahoo.jdisc.http.HttpRequest httpRequest) |
private static long |
getEvalStart(Timing timing,
long startTime) |
private void |
logTimes(long startTime,
String sourceIP,
long renderStartTime,
long commitStartTime,
long endTime,
String req,
String normalizedQuery,
Timing t) |
private void |
populateAccessLogEntryNotCreatedByHttpServer(com.yahoo.container.logging.AccessLogEntry logEntry,
com.yahoo.jdisc.http.HttpRequest httpRequest,
Timing timing,
String fullRequest,
long commitStartTime,
long startTime,
long written,
int status) |
private static String |
remoteHostAddress(com.yahoo.jdisc.http.HttpRequest httpRequest) |
addDateHeader, asHttpRequest, handle, handle, handleRequest
getTimeout, handleRequest
currentState, destroy, refer, release, retainCount
public LoggingRequestHandler(Executor executor, com.yahoo.container.logging.AccessLog accessLog)
@Inject public LoggingRequestHandler(Executor executor, com.yahoo.container.logging.AccessLog accessLog, com.yahoo.jdisc.Metric metric)
public LoggingRequestHandler(Executor executor, com.yahoo.container.logging.AccessLog accessLog, com.yahoo.jdisc.Metric metric, boolean allowAsyncResponse)
protected LoggingCompletionHandler createLoggingCompletionHandler(long startTime, long renderStartTime, HttpResponse response, HttpRequest httpRequest, ContentChannelOutputStream rendererWiring)
ThreadedHttpRequestHandler
createLoggingCompletionHandler
in class ThreadedHttpRequestHandler
startTime
- execution startrenderStartTime
- start of output renderingresponse
- the response which the log entry regardshttpRequest
- the incoming HTTP requestrendererWiring
- the stream the rendered response is written to, used for
fetching length of rendered responseprivate static String getClientIP(com.yahoo.jdisc.http.HttpRequest httpRequest)
private static long getEvalStart(Timing timing, long startTime)
private static String remoteHostAddress(com.yahoo.jdisc.http.HttpRequest httpRequest)
private void logTimes(long startTime, String sourceIP, long renderStartTime, long commitStartTime, long endTime, String req, String normalizedQuery, Timing t)
private void populateAccessLogEntryNotCreatedByHttpServer(com.yahoo.container.logging.AccessLogEntry logEntry, com.yahoo.jdisc.http.HttpRequest httpRequest, Timing timing, String fullRequest, long commitStartTime, long startTime, long written, int status)
Copyright © 2017. All rights reserved.