public abstract class EdalAbstractRequestLog
extends org.eclipse.jetty.util.component.AbstractLifeCycle
implements org.eclipse.jetty.server.RequestLog
| Modifier and Type | Field and Description |
|---|---|
protected static org.eclipse.jetty.util.log.Logger |
LOG |
| Constructor and Description |
|---|
EdalAbstractRequestLog() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
doStart()
Set up request logging and open log file.
|
protected void |
doStop() |
java.lang.String[] |
getIgnorePaths()
Retrieve the request paths that will not be logged.
|
boolean |
getLogCookies()
Retrieve log cookies flag
|
java.lang.String |
getLogDateFormat()
Retrieve the timestamp format string for request log entries.
|
boolean |
getLogLatency()
Retrieve log request processing time flag.
|
java.util.Locale |
getLogLocale()
Retrieve the locale of the request log.
|
boolean |
getLogServer()
Retrieve log hostname flag.
|
java.lang.String |
getLogTimeZone()
Retrieve the timezone of the request log.
|
boolean |
getPreferProxiedForAddress()
Retrieved log X-Forwarded-For IP address flag.
|
protected abstract boolean |
isEnabled()
Is logging enabled
|
boolean |
isExtended()
Retrieve the extended request log format flag.
|
boolean |
isLogDispatch()
Deprecated.
use
StatisticsHandler |
void |
log(org.eclipse.jetty.server.Request request,
org.eclipse.jetty.server.Response response)
Writes the request and response information to the output stream.
|
protected void |
logExtended(org.eclipse.jetty.server.Request request,
org.eclipse.jetty.server.Response response,
java.lang.StringBuilder b)
Writes extended request and response information to the output stream.
|
void |
setExtended(boolean extended)
Set the extended request log format flag.
|
void |
setIgnorePaths(java.lang.String[] ignorePaths)
Set request paths that will not be logged.
|
void |
setLogCookies(boolean logCookies)
Controls logging of the request cookies.
|
void |
setLogDateFormat(java.lang.String format)
Set the timestamp format for request log entries in the file.
|
void |
setLogDispatch(boolean value)
Deprecated.
use
StatisticsHandler |
void |
setLogLatency(boolean logLatency)
Controls logging of request processing time.
|
void |
setLogLocale(java.util.Locale logLocale)
Set the locale of the request log.
|
void |
setLogServer(boolean logServer)
Controls logging of the request hostname.
|
void |
setLogTimeZone(java.lang.String tz)
Set the timezone of the request log.
|
void |
setPreferProxiedForAddress(boolean preferProxiedForAddress)
Controls whether the actual IP address of the connection or the IP address
from the X-Forwarded-For header will be logged.
|
abstract void |
write(java.lang.String requestEntry)
Write requestEntry out.
|
addLifeCycleListener, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, setStopTimeout, start, stopprotected abstract boolean isEnabled()
public abstract void write(java.lang.String requestEntry)
throws java.io.IOException
requestEntry - the request entry stringjava.io.IOException - if failed to writepublic void log(org.eclipse.jetty.server.Request request,
org.eclipse.jetty.server.Response response)
log in interface org.eclipse.jetty.server.RequestLogRequestLog.log(org.eclipse.jetty.server.Request,
org.eclipse.jetty.server.Response)protected void logExtended(org.eclipse.jetty.server.Request request,
org.eclipse.jetty.server.Response response,
java.lang.StringBuilder b)
throws java.io.IOException
request - request objectresponse - response objectb - StringBuilder to write tojava.io.IOException - if failedpublic void setIgnorePaths(java.lang.String[] ignorePaths)
ignorePaths - array of request pathspublic java.lang.String[] getIgnorePaths()
public void setLogCookies(boolean logCookies)
logCookies - true - values of request cookies will be logged, false - values of
request cookies will not be loggedpublic boolean getLogCookies()
public void setLogServer(boolean logServer)
logServer - true - request hostname will be logged, false - request hostname
will not be loggedpublic boolean getLogServer()
public void setLogLatency(boolean logLatency)
logLatency - true - request processing time will be logged false - request
processing time will not be loggedpublic boolean getLogLatency()
public void setLogDispatch(boolean value)
StatisticsHandlervalue - value to setpublic boolean isLogDispatch()
StatisticsHandlerpublic void setPreferProxiedForAddress(boolean preferProxiedForAddress)
preferProxiedForAddress - true - IP address from header will be logged, false - IP address
from the connection will be loggedpublic boolean getPreferProxiedForAddress()
public void setExtended(boolean extended)
extended - true - log the extended request information, false - do not log
the extended request information@ManagedAttribute(value="use extended NCSA format") public boolean isExtended()
protected void doStart()
throws java.lang.Exception
doStart in class org.eclipse.jetty.util.component.AbstractLifeCyclejava.lang.ExceptionAbstractLifeCycle.doStart()protected void doStop()
throws java.lang.Exception
doStop in class org.eclipse.jetty.util.component.AbstractLifeCyclejava.lang.Exceptionpublic void setLogDateFormat(java.lang.String format)
format - timestamp format stringpublic java.lang.String getLogDateFormat()
public void setLogLocale(java.util.Locale logLocale)
logLocale - locale objectpublic java.util.Locale getLogLocale()
public void setLogTimeZone(java.lang.String tz)
tz - timezone string@ManagedAttribute(value="the timezone") public java.lang.String getLogTimeZone()