|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpeer2me.util.Log
This class contains functionality to create and maintain a log of events and exceptions. The Log contains four differnet kinds of logs, an exception log, a connection log, a data package log and a debug log. They can be used to log events from anywhere in the framework, and the logs can be retreived later to get information about the execution of the MIDlet.
Field Summary | |
static int |
CONNECTION_LOG
|
static int |
DATA_PACKAGE_LOG
|
static int |
DEBUG_LOG
|
static int |
EXCEPTION_LOG
|
Method Summary | |
static Log |
getInstance()
This method returns the only existing instance of the Log class |
java.lang.String |
getLog(int log)
This method returns the desired log in a displayable format. |
void |
logConnection(java.lang.String connectionStatus)
This method adds a Connection entry to the Connection log |
void |
logDataPackage(java.lang.String packageStatus)
This method adds a data package entry to the data package log |
void |
logDebugInfo(java.lang.String location,
java.lang.String debugInfo)
This method adds a Debug entry to the Debug log |
void |
logException(java.lang.String location,
java.lang.Exception exception,
boolean notify)
This method adds an Exception entry to the Exception log |
void |
setFramework(FrameworkFrontEnd framework)
This method is called by the FrameworkFrontEnd to reveal itself to the Log |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int EXCEPTION_LOG
public static final int CONNECTION_LOG
public static final int DATA_PACKAGE_LOG
public static final int DEBUG_LOG
Method Detail |
public static Log getInstance()
public void setFramework(FrameworkFrontEnd framework)
framework
- The FrameworkFrontEnd refrence sent by the FrameworkFrontEnd itselfpublic void logException(java.lang.String location, java.lang.Exception exception, boolean notify)
location
- The location (class and method) where the Exception occuredexception
- The actual Exceptionnotify
- This boolean decides whether or not to notify the Framework about the Exception that occuredpublic void logConnection(java.lang.String connectionStatus)
connectionStatus
- A textual description of the connection statuspublic void logDataPackage(java.lang.String packageStatus)
packageStatus
- A textual description of the data package statuspublic void logDebugInfo(java.lang.String location, java.lang.String debugInfo)
location
- The location (class and method) where the debuginfo was loggeddebugInfo
- A textual description of the debug informationpublic java.lang.String getLog(int log)
log
- The Log.FIELD representing the desired log
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |