public abstract class EdalAbstractLog
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 |
|---|
EdalAbstractLog() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
doStart()
Set up request logging and open log file.
|
protected void |
doStop() |
String[] |
getIgnorePaths()
Retrieve the request paths that will not be logged.
|
boolean |
getLogCookies()
Retrieve log cookies flag
|
String |
getLogDateFormat()
Retrieve the timestamp format string for request log entries.
|
boolean |
getLogLatency()
Retrieve log request processing time flag.
|
Locale |
getLogLocale()
Retrieve the locale of the request log.
|
boolean |
getLogServer()
Retrieve log hostname flag.
|
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,
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(String[] ignorePaths)
Set request paths that will not be logged.
|
void |
setLogCookies(boolean logCookies)
Controls logging of the request cookies.
|
void |
setLogDateFormat(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(Locale logLocale)
Set the locale of the request log.
|
void |
setLogServer(boolean logServer)
Controls logging of the request hostname.
|
void |
setLogTimeZone(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(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(String requestEntry) throws IOException
IOExceptionpublic 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,
StringBuilder b)
throws IOException
request - request objectresponse - response objectb - StringBuilder to write toIOExceptionpublic void setIgnorePaths(String[] ignorePaths)
ignorePaths - array of request pathspublic 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)
StatisticsHandlerpublic 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 Exception
doStart in class org.eclipse.jetty.util.component.AbstractLifeCycleExceptionAbstractLifeCycle.doStart()protected void doStop()
throws Exception
doStop in class org.eclipse.jetty.util.component.AbstractLifeCycleExceptionpublic void setLogDateFormat(String format)
format - timestamp format stringpublic String getLogDateFormat()
public void setLogLocale(Locale logLocale)
logLocale - locale objectpublic Locale getLogLocale()
public void setLogTimeZone(String tz)
tz - timezone string@ManagedAttribute(value="the timezone") public String getLogTimeZone()
Copyright © 2015 Leibniz Institute of Plant Genetics and Crop Plant Research (IPK). All rights reserved.