@ManagedObject(value="Request Log writer which writes to file") public class RequestLogWriter extends AbstractLifeCycle implements RequestLog.Writer
RolloverFileOutputStream.AbstractLifeCycle.AbstractLifeCycleListenerLifeCycle.Listener| Constructor and Description |
|---|
RequestLogWriter() |
RequestLogWriter(java.lang.String filename) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
doStart() |
protected void |
doStop() |
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.
|
java.lang.String |
getTimeZone() |
boolean |
isAppend()
Retrieve append to log flag.
|
protected boolean |
isEnabled()
Deprecated.
|
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 |
setTimeZone(java.lang.String timeZone) |
void |
write(java.lang.String requestEntry) |
addLifeCycleListener, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, setStopTimeout, start, stop, toStringpublic RequestLogWriter()
public RequestLogWriter(java.lang.String filename)
public void setFilename(java.lang.String filename)
RolloverFileOutputStream.filename - file name of the request log@ManagedAttribute(value="filename") public java.lang.String getFileName()
@ManagedAttribute(value="dated filename") public java.lang.String getDatedFilename()
RolloverFileOutputStream.@Deprecated protected boolean isEnabled()
public void setRetainDays(int retainDays)
retainDays - number of days to keep a log file@ManagedAttribute(value="number of days to keep a log file") 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="if request log file will be appended after restart") public boolean isAppend()
public void setFilenameDateFormat(java.lang.String logFileDateFormat)
logFileDateFormat - format string that is passed to RolloverFileOutputStreamRolloverFileOutputStream(String, boolean, int, TimeZone, String, String)@ManagedAttribute(value="log file name date format") public java.lang.String getFilenameDateFormat()
public void write(java.lang.String requestEntry)
throws java.io.IOException
write in interface RequestLog.Writerjava.io.IOExceptionprotected void doStart()
throws java.lang.Exception
doStart in class AbstractLifeCyclejava.lang.Exceptionpublic void setTimeZone(java.lang.String timeZone)
@ManagedAttribute(value="timezone of the log") public java.lang.String getTimeZone()
protected void doStop()
throws java.lang.Exception
doStop in class AbstractLifeCyclejava.lang.ExceptionCopyright © 1995–2022 Webtide. All rights reserved.