|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mortbay.http.NCSARequestLog
NCSA HTTP Request Log. NCSA common or NCSA extended (combined) request log.
| Constructor Summary | |
NCSARequestLog()
Constructor. |
|
NCSARequestLog(java.lang.String filename)
Constructor. |
|
| Method Summary | |
java.lang.String |
getDatedFilename()
Get the dated log filename. |
java.lang.String |
getFilename()
Get the log filename. |
java.lang.String[] |
getIgnorePaths()
|
boolean |
getLogCookies()
|
java.lang.String |
getLogDateFormat()
|
boolean |
getLogLatency()
|
java.lang.String |
getLogTimeZone()
|
int |
getRetainDays()
|
boolean |
isAppend()
|
boolean |
isExtended()
|
boolean |
isStarted()
|
void |
log(HttpRequest request,
HttpResponse response,
int responseLength)
Log a request. |
void |
setAppend(boolean a)
|
void |
setBuffered(boolean b)
Deprecated. ignored |
void |
setExtended(boolean e)
|
void |
setFilename(java.lang.String filename)
Set the log filename. |
void |
setIgnorePaths(java.lang.String[] ignorePaths)
Set which paths to ignore. |
void |
setLogCookies(boolean logCookies)
|
void |
setLogDateFormat(java.lang.String format)
|
void |
setLogLatency(boolean logLatency)
|
void |
setLogTimeZone(java.lang.String tz)
|
void |
setPreferProxiedForAddress(boolean value)
Prefer to log the proxied-for IP address (if present in the request header) over the native requester IP address. |
void |
setRetainDays(int retainDays)
|
void |
start()
Start the LifeCycle. |
void |
stop()
Stop the LifeCycle. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public NCSARequestLog()
public NCSARequestLog(java.lang.String filename)
throws java.io.IOException
filename - Filename, which can be in
rolloverFileOutputStream format
java.io.IOExceptionRolloverFileOutputStream| Method Detail |
public void setFilename(java.lang.String filename)
filename - The filename to use. If the filename contains the
string "yyyy_mm_dd", then a RolloverFileOutputStream is used and the
log is rolled over nightly and aged according setRetainDays. If no
filename is set or a null filename
passed, then requests are logged to System.err.setRetainDays(int)public java.lang.String getFilename()
getDatedFilename()public java.lang.String getDatedFilename()
getFilename()public void setLogDateFormat(java.lang.String format)
format - The date format to use within the log file.public java.lang.String getLogDateFormat()
public void setLogTimeZone(java.lang.String tz)
tz - The date format timezone to use within the log file.public java.lang.String getLogTimeZone()
public int getRetainDays()
public void setRetainDays(int retainDays)
retainDays - The number of days to retain rollovered log files.public boolean isExtended()
public void setExtended(boolean e)
e - True if NCSA extended format is to be used.public boolean isAppend()
public void setAppend(boolean a)
a - True if logs are appended to existing log files.public void setBuffered(boolean b)
public void setIgnorePaths(java.lang.String[] ignorePaths)
ignorePaths - Array of path specifications to ignorepublic java.lang.String[] getIgnorePaths()
public boolean getLogCookies()
public void setLogCookies(boolean logCookies)
logCookies - The logCookies to set.public boolean getLogLatency()
public void setLogLatency(boolean logLatency)
logLatency - If true, latency is logged at the end of the log linepublic void setPreferProxiedForAddress(boolean value)
public void start()
throws java.lang.Exception
LifeCycle
start in interface LifeCyclejava.lang.Exception - An arbitrary exception may be thrown.public boolean isStarted()
isStarted in interface LifeCyclepublic void stop()
LifeCycle
stop in interface LifeCycle
public void log(HttpRequest request,
HttpResponse response,
int responseLength)
log in interface RequestLogrequest - The requestresponse - The response to this request.responseLength - The bytes written to the response.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||