|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectto.etc.util.StandardLogfile
to.etc.util.RotatingLogfile
public class RotatingLogfile
Encapsulates a rotating logfile. It contains methods to write log records to a file; the file will rotate to a new name every day round midnight. By default it will clear out files older than 7 days when rotating. Before using the logfile you MUST have called setName, or you must have used the constructor which passed a name. The name is the full path to a logfile including a filename. The system will insert a date part BEFORE the filename extension for every logfile generated. So when entering a name like /var/log/serverinfo/mailer.log a generated name could be something like /var/log/serverinfo/mailer2001-12-31.log
Constructor Summary | |
---|---|
RotatingLogfile()
|
|
RotatingLogfile(java.lang.String name)
|
Method Summary | |
---|---|
protected java.util.Date |
checkCycle()
Checks to see if the log must be opened/rotated. |
void |
setFile(java.io.File f)
Sets a new file as the logfile. |
Methods inherited from class to.etc.util.StandardLogfile |
---|
exception, flush, getFile, getName, getOutWriter, log, rawlog, setName, setOutWriter |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RotatingLogfile()
public RotatingLogfile(java.lang.String name)
Method Detail |
---|
protected java.util.Date checkCycle()
checkCycle
in class StandardLogfile
public void setFile(java.io.File f)
StandardLogfile
setFile
in class StandardLogfile
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |