|
|
||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.protomatter.syslog.BasicLogger | +--com.protomatter.syslog.TimeRolloverLog
An implementation of an object that will log things using the Syslog facility, and roll it's log files after a certain amount of time has passed.
XML configuration class
Field Summary | |
static int |
ROLL_DAILY
Roll logs at midnight. |
static int |
ROLL_HOURLY
Roll logs on the hour. |
static int |
ROLL_MINUTELY
Roll logs on the minute. |
static int |
ROLL_MONTHLY
Roll logs at midnight at the end of the month. |
Fields inherited from class com.protomatter.syslog.BasicLogger |
formatter, policy, realPolicy |
Constructor Summary | |
TimeRolloverLog()
You must call the configure() method to configure this logger if you use this constructor. |
|
TimeRolloverLog(java.lang.String basename,
int roll,
java.lang.String extension)
Write log information to the given log, roll when specified. |
|
TimeRolloverLog(java.lang.String basename,
java.lang.String extension,
int roll,
java.lang.String nameformat,
boolean append,
boolean autoFlush)
Write log information to the given log, roll when specified. |
Method Summary | |
void |
flush()
Flush the given logger's output. |
boolean |
getAppend()
Determine if we will append to files that already exist. |
boolean |
getAutoFlush()
Determine if we will automatically flush the writer. |
java.lang.String |
getBaseFilename()
Get the base name for the log file. |
java.io.File |
getCurrentFile()
Get the file currently being written to. |
java.lang.String |
getFileExtension()
Get the file extension to use. |
java.lang.String |
getNameFormat()
Get the dateformat part of the name. |
java.util.Date |
getNextRolloverTime()
Calculate the next date to rollover the logs based on how often we should roll. |
java.io.File |
getPreviousFile()
Get the file we were writing to before we rolled. |
int |
getRollType()
Get the roll type. |
void |
log(SyslogMessage message)
Log an entry to the log. |
void |
rollover(java.util.Date d)
Roll the logs. |
void |
setAppend(boolean append)
Set if we will append to files that already exist. |
void |
setAutoFlush(boolean flush)
Should we will automatically flush the writer? |
void |
setBaseFilename(java.lang.String basename)
Set the base name for the log file. |
void |
setFileExtension(java.lang.String extension)
Set the file extension to use. |
void |
setNameFormat(java.lang.String fmt)
Set the dateformat part of the name. |
void |
setRollType(int type)
Set the roll type. |
void |
shutdown()
Cleanup and prepare for shutdown. |
Methods inherited from class com.protomatter.syslog.BasicLogger |
formatLogEntry, getName, getPolicy, getTextFormatter, isSuspended, mightLog, resetDateFormat, resume, setName, setPolicy, setTextFormatter, shouldLog, suspend |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static int ROLL_MINUTELY
public static int ROLL_HOURLY
public static int ROLL_DAILY
public static int ROLL_MONTHLY
Constructor Detail |
public TimeRolloverLog(java.lang.String basename, int roll, java.lang.String extension)
public TimeRolloverLog(java.lang.String basename, java.lang.String extension, int roll, java.lang.String nameformat, boolean append, boolean autoFlush)
public TimeRolloverLog()
Method Detail |
public int getRollType()
public void setRollType(int type)
public java.lang.String getBaseFilename()
public void setBaseFilename(java.lang.String basename)
public java.lang.String getFileExtension()
public void setFileExtension(java.lang.String extension)
public void setAppend(boolean append)
public boolean getAppend()
public boolean getAutoFlush()
public void setAutoFlush(boolean flush)
public java.io.File getPreviousFile()
public java.io.File getCurrentFile()
public void rollover(java.util.Date d)
public void setNameFormat(java.lang.String fmt)
public java.lang.String getNameFormat()
public final void log(SyslogMessage message)
Syslogger
public java.util.Date getNextRolloverTime()
public void shutdown()
public void flush()
Syslogger
|
Protomatter Software v1.1.7 Copyright 1998-2002 Nate Sammons |
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Protomatter Software v1.1.7 | http://protomatter.sourceforge.net/1.1.7 |