|
jMobileCore toolkit | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jmobilecore.support.Logger
public class Logger
Logs messages to the system output stream.
All methods are wrapped inDebug.ON
checks;
If Debug.ON
is false then all methods simply return doing nothing.
However, for optimizaton purpose all calles should be wrapped into Debug.ON
checks
Example:
if ( Debug.ON ) {
Logger.development( "Some message" );
}
or:
if ( Debug.ON ) {
Logger.OUTPUT_ON = false;
System.err.println( Logger.development( "Some message" ) );
}
Field Summary | |
---|---|
protected static java.lang.String |
DEVELOPMENT
Development indicator |
protected static java.lang.String |
EXCEPTION
Exception indicator |
static boolean |
OUTPUT_ON
Enables or disables output to standard output stream |
protected static java.lang.String |
SEPARATOR
Separator for the message |
static boolean |
SEVERITY_ON
Enables or disables output of severity |
static boolean |
STACK_TRACE_ON
Enables or disables output of stack trace |
protected static java.lang.String |
TABULATION
Tabulation for message alighment |
static boolean |
TIME_ON
Enables or disables output of time |
Method Summary | |
---|---|
static java.lang.String |
development(java.lang.String msg)
Logging of development message. |
static java.lang.String |
development(java.lang.String msg,
int tabs)
Logging of development message. |
static java.lang.String |
exception(java.lang.Throwable throwable)
Logging of an exception and stack trace. |
static java.lang.String |
exception(java.lang.Throwable throwable,
int tabs)
Logging of an exception and stack trace. |
static java.lang.String |
exception(java.lang.Throwable throwable,
java.lang.String msg)
Logging of an exception and stack trace. |
static java.lang.String |
logMemory(java.lang.String msg)
Logging of memory message. |
protected static java.lang.String |
logMessage(java.lang.String msg,
java.lang.String severity,
int tabs)
Logging of the message, adding the timestamp and severity indicator. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final java.lang.String DEVELOPMENT
protected static final java.lang.String EXCEPTION
public static boolean OUTPUT_ON
protected static final java.lang.String SEPARATOR
public static boolean SEVERITY_ON
public static boolean STACK_TRACE_ON
protected static final java.lang.String TABULATION
public static boolean TIME_ON
Method Detail |
---|
public static final java.lang.String development(java.lang.String msg)
msg
- the logging message.
public static final java.lang.String development(java.lang.String msg, int tabs)
msg
- the logging message.
public static final java.lang.String exception(java.lang.Throwable throwable)
throwable
- the exception
exception(Throwable throwable, int tabs)
public static final java.lang.String exception(java.lang.Throwable throwable, int tabs)
throwable
- the exceptiontabs
- the number of tabulations for the message alignment
public static final java.lang.String exception(java.lang.Throwable throwable, java.lang.String msg)
throwable
- the exceptionmsg
- the additional message
public static java.lang.String logMemory(java.lang.String msg)
msg
- the additional message
protected static final java.lang.String logMessage(java.lang.String msg, java.lang.String severity, int tabs)
msg
- the logging message.severity
- the message severity.tabs
- the number of tabulations for the message alignment
|
jMobileCore toolkit | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |