@ManagedObject(value="NCSA standard format request log") public class NCSARequestLog extends AbstractNCSARequestLog implements RequestLog
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.AbstractLifeCycle.AbstractLifeCycleListenerLifeCycle.ListenerLOG| Constructor and Description |
|---|
NCSARequestLog()
Create request log object with default settings.
|
NCSARequestLog(String filename)
Create request log object with specified output file name.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
doStart()
Set up request logging and open log file.
|
protected void |
doStop()
Close the log file and perform cleanup.
|
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. |
String |
getFilename()
Retrieve the output file name of the request log.
|
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(String filename)
Set the output file name of the request log.
|
void |
setFilenameDateFormat(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(String requestEntry)
Write requestEntry out.
|
getIgnorePaths, getLogCookies, getLogDateFormat, getLogLatency, getLogLocale, getLogServer, getLogTimeZone, getPreferProxiedForAddress, isExtended, isLogDispatch, log, logExtended, setExtended, setIgnorePaths, setLogCookies, setLogDateFormat, setLogDispatch, setLogLatency, setLogLocale, setLogServer, setLogTimeZone, setPreferProxiedForAddressaddLifeCycleListener, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, setStopTimeout, start, stopclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitlogaddLifeCycleListener, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stoppublic NCSARequestLog()
public NCSARequestLog(String filename)
filename - the file name for the request log.
This may be in the format expected
by RolloverFileOutputStreampublic void setFilename(String filename)
RolloverFileOutputStream.filename - file name of the request log@ManagedAttribute(value="file of log") public String getFilename()
public String getDatedFilename()
RolloverFileOutputStream.protected boolean isEnabled()
AbstractNCSARequestLogisEnabled in class AbstractNCSARequestLogpublic void setRetainDays(int retainDays)
retainDays - number of days to keep a log file@ManagedAttribute(value="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(value="existing log files are appends to the new one") public boolean isAppend()
public void setFilenameDateFormat(String logFileDateFormat)
logFileDateFormat - format string that is passed to RolloverFileOutputStreamRolloverFileOutputStream.RolloverFileOutputStream(String, boolean, int, TimeZone, String, String)public String getFilenameDateFormat()
public void write(String requestEntry) throws IOException
AbstractNCSARequestLogwrite in class AbstractNCSARequestLogIOExceptionprotected void doStart()
throws Exception
doStart in class AbstractNCSARequestLogExceptionAbstractLifeCycle.doStart()protected void doStop()
throws Exception
doStop in class AbstractNCSARequestLogExceptionAbstractLifeCycle.doStop()Copyright © 1995-2015 Webtide. All Rights Reserved.