|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--ec.util.Log
Defines a log to which Output outputs. A log consists of three items:
Field Summary | |
boolean |
appendOnRestart
If the log writes to a file, should it append to the file on restart, or should it overwrite the file? |
static int |
D_STDERR
Specifies that the log should write to stderr (System.err) |
static int |
D_STDOUT
Specifies that the log should write to stdout (System.out) |
java.io.File |
filename
A filename, if the writer writes to a file |
boolean |
postAnnouncements
Should the log post announcements? |
boolean |
repostAnnouncementsOnRestart
Should the log repost all announcements on restart |
LogRestarter |
restarter
The log's restarter |
int |
verbosity
The log's verbosity. |
java.io.PrintWriter |
writer
The log's writer |
Constructor Summary | |
Log(java.io.File _filename,
int _verbosity,
boolean _postAnnouncements,
boolean _appendOnRestart)
Creates a log to a given filename; this file may or may not be appended to on restart, depending on _appendOnRestart. |
|
Log(int descriptor,
int _verbosity,
boolean _postAnnouncements)
Creates a log on stdout (descriptor == Log.D_STDOUT) or stderr (descriptor == Log.D_STDERR). |
|
Log(java.io.Writer _writer,
LogRestarter _restarter,
int _verbosity,
boolean _postAnnouncements,
boolean _repostAnnouncementsOnRestart)
Creates a log on a given Writer and custom LogRestarter. |
Method Summary | |
Log |
reopen()
Forces a file-based log to reopen, erasing its previous contents. |
Log |
restart()
Restarts a log after a system restart from checkpoint. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public transient java.io.PrintWriter writer
public java.io.File filename
public int verbosity
public boolean postAnnouncements
public LogRestarter restarter
public boolean repostAnnouncementsOnRestart
public boolean appendOnRestart
public static final int D_STDOUT
public static final int D_STDERR
Constructor Detail |
public Log(java.io.File _filename, int _verbosity, boolean _postAnnouncements, boolean _appendOnRestart) throws java.io.IOException
public Log(int descriptor, int _verbosity, boolean _postAnnouncements)
public Log(java.io.Writer _writer, LogRestarter _restarter, int _verbosity, boolean _postAnnouncements, boolean _repostAnnouncementsOnRestart)
Method Detail |
public Log restart() throws java.io.IOException
public Log reopen() throws java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |