|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.ohf.stem.ui.ge.GELog
public class GELog
debug Utility methods for GoogleEarth Interface
* The main use of this class is to provide additional debugging output when in debug mode on the primary eclipse console and still provide logging of exceptions to the eclipse ILog error log facility. Although Eclipse provides an Error log facility in the application workbench being tested, it is more convienent to get your debug messages and unexpected exception in the Eclipse Console that is controling the test environment.
Typical use of this class:
// early in startup. // in view constructor or junit test class GELog.DEBUG = true; ... GELog.debug(this,"Current simulation: "+simulation); try { ... } catch (Exception e) { GELOG.error("strange failure",e); }When DEBUG is true then both the Eclipse console and the Eclipse log will get the debug msg and the exception stacktrace but if DEBUG is false then the debug message will not appear anywhere and the Exception stacktrace will only appear in the eclipse log.
Field Summary | |
---|---|
static boolean |
DEBUG
if true then GElog methods produces output It would be set true normally in the GEView constructor based on the PrefereencePage setting. |
Constructor Summary | |
---|---|
GELog()
|
Method Summary | |
---|---|
static void |
debug(java.lang.Object where,
java.lang.String msg)
temporary debug statements. |
static void |
debug(java.lang.String msg)
temporary debug statements. |
static void |
error(java.lang.String msg,
java.lang.Throwable t)
handler for exceptions that occur |
static void |
info(java.lang.Class current,
java.lang.String msg)
handler for exceptions that occur |
static void |
info(java.lang.String msg)
Handler for info messages. |
static void |
main(java.lang.String[] args)
main() method for testing. |
static void |
memory()
Call garbage collect and display memory stats |
static boolean |
memoryCheck(double percent)
test if percent of used memory is greater than specified percent. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static boolean DEBUG
Constructor Detail |
---|
public GELog()
Method Detail |
---|
public static void debug(java.lang.String msg)
msg
- The string to be displayed.public static void debug(java.lang.Object where, java.lang.String msg)
Example:
GELog.debug(this,"a msg to help debugging");
-->>
System.out.println("AclassName: a msg to help debugging");
where
- - Indicator of class where msg generated
Can be String, class or instancemsg
- The string to be displayed.public static void info(java.lang.Class current, java.lang.String msg)
current
- Class that produced msgmsg
- Messsage to be displayed (if not null)public static void info(java.lang.String msg)
msg
- public static void error(java.lang.String msg, java.lang.Throwable t)
msg
- Messsage to be displayed (if not null)t
- Exception that caused this if not nullpublic static void memory()
public static boolean memoryCheck(double percent)
percent
- to check against.
Example: 0.9 = 90%
public static void main(java.lang.String[] args)
args
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |