|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--jade.util.Logger
This class provides a uniform way to produce logging printouts
in a device dependent way. More in details if you are running
JADE in a Java 2 standard edition environment or in a
PersonalJava environment (through the LEAP add-on) a call to
Logger.println() simply results in a call to
System.out.println(). On the other hand if you are
running JADE in a MIDP environment (again through the LEAP add-on)
printouts are redirected so that they can be later viewed by
means of the jade.util.leap.OutputViewer MIDlet
included in the LEAP add-on.
| Constructor Summary | |
Logger(java.lang.String id,
int verbosity)
Create a logger object with the given name and verbosity level. |
|
Logger(java.lang.String id,
int verbosity,
java.lang.String timeFormat,
java.lang.String logFormat)
Create a logger object with a custom log format. |
|
| Method Summary | |
void |
log(java.lang.String msg,
int level)
Log a given message if the level is <= than the
verbosity level of this Logger object. |
static void |
println()
Print a new line on the log stream. |
static void |
println(java.lang.String s)
Print a String in a device dependent way. |
void |
setLogFormat(java.lang.String format)
Define the log format of this Logger object. |
void |
setTimeFormat(java.lang.String format)
Establish a time format for this logger. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Logger(java.lang.String id,
int verbosity)
id - The name identifying the new logger.verbosity - The verbosity level.
public Logger(java.lang.String id,
int verbosity,
java.lang.String timeFormat,
java.lang.String logFormat)
id - The name identifying the new logger.verbosity - The verbosity level.timeFormat - The format for log timestamps.logFormat - The format for log messages.| Method Detail |
public static void println()
public static void println(java.lang.String s)
public void log(java.lang.String msg,
int level)
level is <= than the
verbosity level of this Logger object.
public void setLogFormat(java.lang.String format)
public void setTimeFormat(java.lang.String format)
format - A string detailing the desired format for log
messages.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||