|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnan.tools.EventLogger
Logs messages, errors, and warnings as the program runs.
Field Summary | |
static java.lang.String |
ERROR
The marker for errors. |
static java.lang.String |
MESSAGE
The marker for messages. |
static java.lang.String |
SEPARATOR
The separator String. |
static java.lang.String |
WARNING
The marker for warnings. |
Method Summary | |
void |
close()
Closes the event logger. |
static EventLogger |
getInstance()
Gets the singleton instance of the EventLogger. |
static java.lang.String |
getLogFileName()
Gets the name of the log file for the current day. |
boolean |
isReady()
Asks if the logger is ready. |
void |
logError(java.lang.String error)
Logs an error message. |
void |
logMessage(java.lang.String message)
Logs a normal message. |
void |
logWarning(java.lang.String warning)
Logs a warning. |
void |
open(java.io.File file)
Opens the EventLogger on a file. |
java.lang.String |
toString()
Returns a String representation of this object. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final java.lang.String MESSAGE
public static final java.lang.String ERROR
public static final java.lang.String WARNING
public static final java.lang.String SEPARATOR
Method Detail |
public static final EventLogger getInstance()
public static java.lang.String getLogFileName()
public boolean isReady()
public void open(java.io.File file)
file
- The name file to post events to.public void close()
public void logMessage(java.lang.String message) throws NotReadyException
message
- The message.
NotReadyException
- if this logger has not been initialized.public void logError(java.lang.String error) throws NotReadyException
error
- The error message.
NotReadyException
- if this logger has not been initialized.public void logWarning(java.lang.String warning) throws NotReadyException
warning
- The warning message.
NotReadyException
- if this logger has not been initialized.public java.lang.String toString()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |