: Class RolloverFileLogSink

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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 ROLLOVER_LOG_MULT_DAY If true, Jetty will keep multiple log files for same day, if server is halted and restored. Useful for debugging server crashes.

Version:
  1.0 Tue May 23 2000
Author:
  V. Lipovetsky, Kent Johnson

Fields inherited from class com.mortbay.Base.LogSink
`_dateFormat, _logLabels, _logOneLine, _logStackSize, _logStackTrace, _logTags, _logTimeStamps, _out`

Constructor Summary
`RolloverFileLogSink()`
`RolloverFileLogSink(java.lang.String newLogDir, int newRetainDays, java.lang.String newLogExt, long newThreadStopTimeout, long newTimerInterval)` Constructor.

Method Summary
`void` | `cleanup()`
`java.lang.String` | `getLogExt()`
`int` | `getRetainDays()`
`long` | `getThreadStopTimeout()`
`long` | `getTimerInterval()`
`boolean` | `isCreated()` data members
`void` | `run()`
`void` | `setLogDir(java.lang.String newValue)`
`void` | `setLogExt(java.lang.String newValue)`
`void` | `setRetainDays(int newValue)`
`void` | `setThreadStopTimeout(long newValue)`
`void` | `setTimerInterval(long newValue)`
`void` | `stop()` Stop a log sink.

Methods inherited from class com.mortbay.Base.LogSink
`log, log, setOptions, setWriter`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### 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 -

Method Detail

### 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

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD