|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--edu.mssm.crover.joe.LogImpl
Simple LogImpl API for RbDe use.
| Field Summary |
| Fields inherited from interface edu.mssm.crover.joe.Log |
ALL_BUT_DEBUG, ALL_SUPPORTED_SEVERITY_FLAGS, DEBUG, EXCEPTIONS, FATAL, INFO, PROBLEM, SEVERE, SILENT, VERBOSE, WARNING |
| Constructor Summary | |
LogImpl()
The default configuration of the masks is quite pedantic for the console (stderr) and file log but sparse for the GUI. |
|
| Method Summary | |
protected void |
appendLogFile(java.lang.String msg)
|
protected void |
appendLogFile(java.lang.String msg,
java.lang.Throwable e)
Opens, append then close the logfile. |
java.lang.String |
getLevelString(int level)
|
void |
log(int level,
java.lang.String message)
|
void |
log(int level,
java.lang.String message,
java.lang.Exception e)
|
static void |
main(java.lang.String[] args)
Run a simple test of the Log feature. |
void |
setFileReportingLevel(int mask)
Mask the events that have to be written to the log file. |
void |
setLogDate(boolean show)
Turns on/off the addition of the current date in the logs. |
void |
setLogFile(java.io.File f)
Sets the log-file path. |
void |
setPopupLevel(int mask)
Mask the events that have to bring GUI popup dialogs. |
void |
setReportingLevel(int mask)
Mask the events that have to be reported. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public LogImpl()
| Method Detail |
public java.lang.String getLevelString(int level)
getLevelString in interface Log
public void log(int level,
java.lang.String message)
log in interface Log
public void log(int level,
java.lang.String message,
java.lang.Exception e)
log in interface Log
public void setReportingLevel(int mask)
throws InvalidArgumentException
setReportingLevel(Log.FATAL);If you prefer to see everyting but general information, do
setReportingLevel(Log.FATAL|Log.SEVERE|Log.PROBLEM|Log.WARNING);All the combinations are available.
setReportingLevel in interface Logmask - A boolean mask made of the boolean combination of the severity flags.
InvalidArgumentException
public void setPopupLevel(int mask)
throws InvalidArgumentException
setPopupLevel in interface Logmask - A boolean mask made of the boolean combination of the severity flags.
InvalidArgumentExceptionfor example of the mask use.
public void setFileReportingLevel(int mask)
throws InvalidArgumentException
setFileReportingLevel in interface Logmask - A boolean mask made of the boolean combination of the severity flags.
InvalidArgumentExceptionfor example of the mask use.
public void setLogFile(java.io.File f)
throws java.io.IOException
setLogFile in interface Logjava.io.IOException - When a problem occur opening the file or appending the start message.
protected void appendLogFile(java.lang.String msg)
throws java.io.IOException
java.io.IOException
protected void appendLogFile(java.lang.String msg,
java.lang.Throwable e)
throws java.io.IOException
java.io.IOExceptionpublic void setLogDate(boolean show)
setLogDate in interface Logpublic static void main(java.lang.String[] args)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||