RequestLogAsyncNCSARequestLog@ManagedObject("NCSA standard format request log")
public class NCSARequestLog
extends AbstractNCSARequestLog
RequestLog implementation outputs logs in the pseudo-standard
NCSA common log format. Configuration options allow a choice between the
standard Common Log Format (as used in the 3 log format) and the Combined Log
Format (single log format). This log format can be output by most web
servers, and almost all web log analysis software can understand these
formats.FAILED, RUNNING, STARTED, STARTING, STOPPED, STOPPINGLOG| Constructor | Description |
|---|---|
NCSARequestLog() |
Create request log object with default settings.
|
NCSARequestLog(java.lang.String filename) |
Create request log object with specified output file name.
|
| Modifier and Type | Method | Description |
|---|---|---|
protected void |
doStart() |
Set up request logging and open log file.
|
protected void |
doStop() |
Close the log file and perform cleanup.
|
java.lang.String |
getDatedFilename() |
Retrieve the file name of the request log with the expanded
date wildcard if the output is written to the disk using
RolloverFileOutputStream. |
java.lang.String |
getFilename() |
Retrieve the output file name of the request log.
|
java.lang.String |
getFilenameDateFormat() |
Retrieve the file name date format string.
|
int |
getRetainDays() |
Retrieve the number of days before rotated log files are deleted.
|
boolean |
isAppend() |
Retrieve append to log flag.
|
protected boolean |
isEnabled() |
Is logging enabled
|
void |
setAppend(boolean append) |
Set append to log flag.
|
void |
setFilename(java.lang.String filename) |
Set the output file name of the request log.
|
void |
setFilenameDateFormat(java.lang.String logFileDateFormat) |
Set the log file name date format.
|
void |
setRetainDays(int retainDays) |
Set the number of days before rotated log files are deleted.
|
void |
write(java.lang.String requestEntry) |
Write requestEntry out.
|
addLifeCycleListener, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, setStopTimeout, start, stop, toStringgetAuthentication, getIgnorePaths, getLogCookies, getLogDateFormat, getLogLatency, getLogLocale, getLogServer, getLogTimeZone, getPreferProxiedForAddress, isExtended, isLogDispatch, log, logExtended, setExtended, setIgnorePaths, setLogCookies, setLogDateFormat, setLogDispatch, setLogLatency, setLogLocale, setLogServer, setLogTimeZone, setPreferProxiedForAddresspublic NCSARequestLog()
public NCSARequestLog(java.lang.String filename)
filename - the file name for the request log.
This may be in the format expected
by RolloverFileOutputStreampublic void setFilename(java.lang.String filename)
RolloverFileOutputStream.filename - file name of the request log@ManagedAttribute("file of log")
public java.lang.String getFilename()
public java.lang.String getDatedFilename()
RolloverFileOutputStream.protected boolean isEnabled()
AbstractNCSARequestLogisEnabled in class AbstractNCSARequestLogpublic void setRetainDays(int retainDays)
retainDays - number of days to keep a log file@ManagedAttribute("number of days that log files are kept")
public int getRetainDays()
public void setAppend(boolean append)
append - true - request log file will be appended after restart,
false - request log file will be overwritten after restart@ManagedAttribute("existing log files are appends to the new one")
public boolean isAppend()
public void setFilenameDateFormat(java.lang.String logFileDateFormat)
logFileDateFormat - format string that is passed to RolloverFileOutputStreamRolloverFileOutputStream(String, boolean, int, TimeZone, String, String)public java.lang.String getFilenameDateFormat()
public void write(java.lang.String requestEntry)
throws java.io.IOException
AbstractNCSARequestLogwrite in class AbstractNCSARequestLogrequestEntry - the request entryjava.io.IOException - if unable to write the entryprotected void doStart()
throws java.lang.Exception
doStart in class AbstractNCSARequestLogjava.lang.ExceptionAbstractLifeCycle.doStart()protected void doStop()
throws java.lang.Exception
doStop in class AbstractNCSARequestLogjava.lang.ExceptionAbstractLifeCycle.doStop()Copyright © 1995–2018 Webtide. All rights reserved.