|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjavax.microedition.lcdui.Displayable
javax.microedition.lcdui.Screen
javax.microedition.lcdui.Form
net.sf.btw.commons.Logger
public final class Logger
Able to log application status.
| Field Summary | |
|---|---|
static int |
CURRENT_LEVEL
Current log level. |
static boolean |
ENABLE_CONSOLE
If true then the original System.out is used to print log
aswell. |
static int |
LEVEL_DEBUG
Debug log level. |
static int |
LEVEL_ERROR
Error log level. |
static int |
LEVEL_INFO
Info log level. |
static int |
LEVEL_WARNING
Warning log level. |
| Constructor Summary | |
|---|---|
Logger(Displayable previous,
Display display)
Constructs new logger form, immediately switching to the form. |
|
| Method Summary | |
|---|---|
void |
commandAction(Command arg0,
Displayable arg1)
|
static void |
debug(String message,
Throwable ex)
Logs an debug message. |
static void |
error(String message,
Throwable ex)
Logs an error message. |
static void |
info(String message,
Throwable ex)
Logs an info message. |
static boolean |
isLoggable(int level)
Checks if given level is loggable with current log level setting. |
static void |
log(int level,
String message,
Throwable ex)
Logs given event. |
static void |
warn(String message,
Throwable ex)
Logs an warning message. |
| Methods inherited from class javax.microedition.lcdui.Form |
|---|
append, append, append, delete, deleteAll, get, getHeight, getWidth, insert, set, setItemStateListener, size |
| Methods inherited from class javax.microedition.lcdui.Displayable |
|---|
addCommand, getTicker, getTitle, isShown, removeCommand, setCommandListener, setTicker, setTitle, sizeChanged |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int LEVEL_ERROR
public static final int LEVEL_WARNING
public static final int LEVEL_INFO
public static final int LEVEL_DEBUG
public static int CURRENT_LEVEL
LEVEL_WARNING.
public static boolean ENABLE_CONSOLE
true then the original System.out is used to print log
aswell.
| Constructor Detail |
|---|
public Logger(Displayable previous,
Display display)
previous - switch to this displayable when the log window is closed.display - the display instance| Method Detail |
|---|
public static boolean isLoggable(int level)
current log level setting.
level - level to query
true if a message with given level is logged,
false if it is thrown away.
public static void log(int level,
String message,
Throwable ex)
level - the log level.message - the message to log. May be null - in this case
exception message is used.ex - exception to log. May be null only if message
is not null.
public static void info(String message,
Throwable ex)
message - the message to log. May be null - in this case
exception message is used.ex - exception to log. May be null only if message
is not null.
public static void error(String message,
Throwable ex)
message - the message to log. May be null - in this case
exception message is used.ex - exception to log. May be null only if message
is not null.
public static void warn(String message,
Throwable ex)
message - the message to log. May be null - in this case
exception message is used.ex - exception to log. May be null only if message
is not null.
public static void debug(String message,
Throwable ex)
message - the message to log. May be null - in this case
exception message is used.ex - exception to log. May be null only if message
is not null.
public void commandAction(Command arg0,
Displayable arg1)
commandAction in interface CommandListener
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||