|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdd.util.Logger
Provides support for logging and error messages. All logging messages eventually go through this object for storage. Logging is very simple but can be customized through changes to the implementation in this class.
There are four levels of logging provided by this class, in increasing order of severity:
debug
- Debugging messages. These may be
very detailed and turned off for production codelog
- Logging messages. These are
moderate-priority messages that indicate normal action.
warning
- Warning messages. These are
error conditions, but errors which are recoverable (such as caught
exceptions).
error
- Major errors. These are
unrecoverable error conditions. The program may terminate after logging
these errors.
Note that you should never create an instance of the logger,
since all code should share the same log (to simplify synchronization
problems). Instead, you can get the current log for this application by
calling the static getDefaultLog()
factory method.
There are constants defined in this file that can be modified if you wish to suppress or activiate various levels of log messages.
Field Summary | |
static boolean |
LOG_DEBUG
Determines whether debug() calls should appear in the log. |
static boolean |
LOG_ERROR
Determines whether error() calls should appear in the log. |
static boolean |
LOG_LOG
Determines whether log() calls should appear in the log. |
static boolean |
LOG_WARNING
Determines whether warning() calls should appear in the log. |
Method Summary | |
void |
debug(java.lang.String debugMessage)
Logs a debugging message. |
void |
error(java.lang.String errorMessage)
Logs an error message. |
static Logger |
getDefaultLog()
Returns the current application's logger. |
void |
log(java.lang.String logMessage)
Logs a logging message. |
void |
setOutput(java.io.File outFile)
|
void |
warning(java.lang.String warningMessage)
Logs a warning message. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final boolean LOG_DEBUG
public static final boolean LOG_LOG
public static final boolean LOG_WARNING
public static final boolean LOG_ERROR
Method Detail |
public static Logger getDefaultLog()
public void setOutput(java.io.File outFile) throws java.io.IOException
java.io.IOException
public void debug(java.lang.String debugMessage)
debugMessage
- descriptive text for the logpublic void log(java.lang.String logMessage)
logMessage
- descriptive text for the logpublic void warning(java.lang.String warningMessage)
warningMessage
- descriptive text for the logpublic void error(java.lang.String errorMessage)
errorMessage
- descriptive text for the log
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |