org.mortbay.http
public class NCSARequestLog extends Object implements RequestLog
Version: $Id: NCSARequestLog.java,v 1.35 2005/08/13 00:01:24 gregwilkins Exp $
Constructor Summary | |
---|---|
NCSARequestLog() Constructor. | |
NCSARequestLog(String filename) Constructor. |
Method Summary | |
---|---|
String | getDatedFilename() Get the dated log filename. |
String | getFilename() Get the log filename. |
String[] | getIgnorePaths() |
boolean | getLogCookies() |
String | getLogDateFormat() |
boolean | getLogLatency() |
String | getLogTimeZone() |
int | getRetainDays() |
boolean | isAppend() |
boolean | isExtended() |
boolean | isStarted() |
void | log(HttpRequest request, HttpResponse response, int responseLength) Log a request. |
protected void | logExtended(HttpRequest request, HttpResponse response, Writer log) Log Extended fields.
|
void | setAppend(boolean a) |
void | setBuffered(boolean b) |
void | setExtended(boolean e) |
void | setFilename(String filename) Set the log filename. |
void | setIgnorePaths(String[] ignorePaths) Set which paths to ignore.
|
void | setLogCookies(boolean logCookies) |
void | setLogDateFormat(String format) |
void | setLogLatency(boolean logLatency) |
void | setLogTimeZone(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() |
void | stop() |
Parameters: filename Filename, which can be in rolloverFileOutputStream format
Throws: IOException
See Also: RolloverFileOutputStream
Returns: The log filename with any date encoding expanded.
See Also: getFilename
Returns: The log filename without any date expansion.
See Also: getDatedFilename
Returns: Returns the logCookies.
Returns: The date format to use within the log file.
Returns: Returns true if logging latency
Returns: The date format timezone to use within the log file.
Returns: The number of days to retain rollovered log files.
Returns: True if logs are appended to existing log files.
Returns: True if NCSA extended format is to be used.
Parameters: request The request response The response to this request. responseLength The bytes written to the response.
Parameters: request The request to log. response The response to log. log The writer to write the extra fields to.
Throws: IOException Problem writing log
Parameters: a True if logs are appended to existing log files.
Deprecated: ignored
Parameters: e True if NCSA extended format is to be used.
Parameters: 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.
See Also: NCSARequestLog
Parameters: ignorePaths Array of path specifications to ignore
Parameters: logCookies The logCookies to set.
Parameters: format The date format to use within the log file.
Parameters: logLatency If true, latency is logged at the end of the log line
Parameters: tz The date format timezone to use within the log file.
Parameters: retainDays The number of days to retain rollovered log files.