com.mortbay.Base
Class RolloverFileLogSink
java.lang.Object
|
+--com.mortbay.Base.LogSink
|
+--com.mortbay.Base.RolloverFileLogSink
- public class RolloverFileLogSink
- extends LogSink
- implements java.lang.Runnable
Rollover File Log Sink.
This implementation of Log Sink writes logs to a file. Files
are rolled over every day and old files are deleted.
The default constructor looks for these System properties:
ROLLOVER_LOG_DIR The path to the directory containing the logs
ROLLOVER_LOG_RETAIN_DAYS The number of days to retain logs
ROLLOVER_LOG_EXTENSION The file extension for log files
ROLLOVER_LOG_STOP_TIMEOUT How long to wait to kill the cleanup thread
ROLLOVER_LOG_TIMER_INTERVAL How long the cleanup thread sleeps
- Version:
- 1.0 Tue May 23 2000
- Author:
- V. Lipovetsky, Kent Johnson
Constructor Summary |
RolloverFileLogSink()
|
RolloverFileLogSink(java.lang.String newLogDir,
int newRetainDays,
java.lang.String newLogExt,
long newThreadStopTimeout,
long newTimerInterval)
Constructor. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
RolloverFileLogSink
public RolloverFileLogSink()
throws java.io.IOException
RolloverFileLogSink
public RolloverFileLogSink(java.lang.String newLogDir,
int newRetainDays,
java.lang.String newLogExt,
long newThreadStopTimeout,
long newTimerInterval)
throws java.io.IOException
- Constructor.
- Parameters:
newLogDir
- newRetainDays
- newLogExt
- newThreadStopTimeout
- newTimerInterval
- - Throws:
- java.io.IOException -
stop
public void stop()
- Description copied from class: LogSink
- Stop a log sink.
An opportunity for subclasses to clean up. The default
implementation does nothing
- Overrides:
- stop in class LogSink
run
public void run()
- Specified by:
- run in interface java.lang.Runnable
cleanup
public void cleanup()
setLogDir
public void setLogDir(java.lang.String newValue)
throws java.io.IOException
getLogExt
public java.lang.String getLogExt()
setLogExt
public void setLogExt(java.lang.String newValue)
getRetainDays
public int getRetainDays()
setRetainDays
public void setRetainDays(int newValue)
getThreadStopTimeout
public long getThreadStopTimeout()
setThreadStopTimeout
public void setThreadStopTimeout(long newValue)
getTimerInterval
public long getTimerInterval()
setTimerInterval
public void setTimerInterval(long newValue)
isCreated
public boolean isCreated()
- data members