|
||||||||||
| 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.Canvas
org.openbandy.log.LogImpl
public class LogImpl
Implementation of the Log interface for use with CLDC and MIDP on mobile
devices. This class can write log message to a canvas (default), the devices
persistent RMS, or a file.
(c) Copyright P. Bolliger 2007, ALL RIGHTS RESERVED.
| Field Summary | |
|---|---|
LogConfiguration |
config
The configuration of the canvas as a screen |
static java.lang.String |
VALUE_DELIMITER
String value to delimit values |
static java.lang.String |
VARIABLE_DELIMITER
String value to delimit different variables |
| Fields inherited from class javax.microedition.lcdui.Canvas |
|---|
DOWN, FIRE, GAME_A, GAME_B, GAME_C, GAME_D, KEY_NUM0, KEY_NUM1, KEY_NUM2, KEY_NUM3, KEY_NUM4, KEY_NUM5, KEY_NUM6, KEY_NUM7, KEY_NUM8, KEY_NUM9, KEY_POUND, KEY_STAR, LEFT, RIGHT, UP |
| Constructor Summary | |
|---|---|
LogImpl(LogConfiguration config)
Create a new LogImple instance and configure it accordingly |
|
| Method Summary | |
|---|---|
void |
clearCanvas()
Removes all log entries from canvas |
void |
commandAction(javax.microedition.lcdui.Command c,
javax.microedition.lcdui.Displayable d)
|
void |
debug(java.lang.Object origin,
java.lang.String message)
Logs a message with log level LEVEL_DEBUG |
void |
debug(java.lang.String originName,
java.lang.String message)
Logs a message with log level LEVEL_DEBUG |
void |
displayStoredLogMessages()
Print all persistently stored log messages to the canvas. |
void |
error(java.lang.Object origin,
java.lang.String message,
java.lang.Throwable exception)
Logs a message with log level LEVEL_ERROR |
void |
error(java.lang.String originName,
java.lang.String message,
java.lang.Throwable exception)
Logs a message with log level LEVEL_ERROR |
java.lang.String |
getPersistentLogAsString(javax.microedition.lcdui.Displayable currentDisplayable)
|
void |
info(java.lang.Object origin,
java.lang.String message)
Logs a message with log level LEVEL_INFO |
void |
info(java.lang.String originName,
java.lang.String message)
Logs a message with log level LEVEL_INFO |
void |
keyPressed(int key)
Called when a key is pressed, this method handles the scrolling |
void |
run()
|
void |
setLogLevel(int level)
Set the log level |
void |
setMIDlet(javax.microedition.midlet.MIDlet midlet)
|
void |
show(javax.microedition.lcdui.Display display,
javax.microedition.lcdui.Displayable previousDisplayable)
Tells the BandyDisplayable to set itself as the current screen. |
void |
warn(java.lang.Object origin,
java.lang.String message)
Logs a message with log level LEVEL_WARNING |
void |
warn(java.lang.String originName,
java.lang.String message)
Logs a message with log level LEVEL_WARNING |
| Methods inherited from class javax.microedition.lcdui.Canvas |
|---|
getGameAction, getKeyCode, getKeyName, hasPointerEvents, hasPointerMotionEvents, hasRepeatEvents, isDoubleBuffered, repaint, repaint, serviceRepaints, setCommandListener, setFullScreenMode |
| Methods inherited from class javax.microedition.lcdui.Displayable |
|---|
addCommand, getHeight, getTicker, getTitle, getWidth, isShown, removeCommand, setTicker, setTitle |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String VALUE_DELIMITER
public static final java.lang.String VARIABLE_DELIMITER
public LogConfiguration config
| Constructor Detail |
|---|
public LogImpl(LogConfiguration config)
config - The (initial) log config that shall apply to this instance| Method Detail |
|---|
public void setMIDlet(javax.microedition.midlet.MIDlet midlet)
public void error(java.lang.Object origin,
java.lang.String message,
java.lang.Throwable exception)
error in interface Logorigin - The object reportingmessage - The message to logexception - The exception that was caused with this error
public void error(java.lang.String originName,
java.lang.String message,
java.lang.Throwable exception)
error in interface LogoriginName - The class name of the object reportingmessage - The message to logexception - The exception that was caused with this error
public void warn(java.lang.Object origin,
java.lang.String message)
warn in interface Logorigin - The object reportingmessage - The message to log
public void warn(java.lang.String originName,
java.lang.String message)
warn in interface LogoriginName - The class name of the object reportingmessage - The message to log
public void info(java.lang.Object origin,
java.lang.String message)
info in interface Logorigin - The object reportingmessage - The message to log
public void info(java.lang.String originName,
java.lang.String message)
info in interface LogoriginName - The class name of the object reportingmessage - The message to log
public void debug(java.lang.Object origin,
java.lang.String message)
debug in interface Logorigin - The object reportingmessage - The message to log
public void debug(java.lang.String originName,
java.lang.String message)
debug in interface LogoriginName - The class name of the object reportingmessage - The message to logpublic void setLogLevel(int level)
Log
setLogLevel in interface Loglevel - Log level according topublic void displayStoredLogMessages()
public void clearCanvas()
public void show(javax.microedition.lcdui.Display display,
javax.microedition.lcdui.Displayable previousDisplayable)
BandyDisplayable
show in interface BandyDisplayabledisplay - The MIDlets displaypreviousDisplayable - The displayable that is shown before this onepublic void keyPressed(int key)
keyPressed in class javax.microedition.lcdui.Canvaskey - number of the pressed key
public void commandAction(javax.microedition.lcdui.Command c,
javax.microedition.lcdui.Displayable d)
commandAction in interface javax.microedition.lcdui.CommandListenerpublic void run()
run in interface java.lang.Runnablepublic java.lang.String getPersistentLogAsString(javax.microedition.lcdui.Displayable currentDisplayable)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||