|
Java DTV API 1.0 12-Dec-2008 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.lwuit.util.Log
Pluggable logging framework that allows a developer to log into storage using the file connector API. It is highly recommended to use this class coupled with Netbeans preprocessing tags to reduce its overhead completely in runtime.
| Field Summary | |
static int |
DEBUG
Constant indicating the logging level Debug is the default and the lowest level followed by info, warning and error. |
static int |
ERROR
Constant indicating the logging level Debug is the default and the lowest level followed by info, warning and error. |
static int |
INFO
Constant indicating the logging level Debug is the default and the lowest level followed by info, warning and error. |
static int |
WARNING
Constant indicating the logging level Debug is the default and the lowest level followed by info, warning and error. |
| Constructor Summary | |
Log()
|
|
| Method Summary | |
protected Writer |
createWriter()
Default method for creating the output writer into which we write, this method creates a simple log file using the file connector. |
static int |
getLevel()
Returns the logging level for printing log details, the lower the value the more verbose would the printouts be. |
protected String |
getThreadAndTimeStamp()
Returns a simple string containing a timestamp and thread name. |
static void |
install(Log newInstance)
Installs a log subclass that can replace the logging destination/behavior. |
static void |
p(String text)
Default println method invokes the print instance method, uses DEBUG level. |
static void |
p(String text,
int level)
Default println method invokes the print instance method, uses given level. |
protected void |
print(String text,
int level)
Default log implementation prints to the console and the file connector if applicable. |
static void |
setLevel(int level)
Sets the logging level for printing log details, the lower the value the more verbose would the printouts be. |
static void |
showLog()
Places a form with the log as a TextArea on the screen, this method can be attached to appear at a given time or using a fixed global key. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int DEBUG
public static final int INFO
public static final int WARNING
public static final int ERROR
| Constructor Detail |
public Log()
| Method Detail |
public static void install(Log newInstance)
newInstance - the new instance for the Log objectpublic static void p(String text)
text - the text to print
public static void p(String text,
int level)
text - the text to printlevel - one of DEBUG, INFO, WARNING, ERROR
protected void print(String text,
int level)
text - the text to printlevel - one of DEBUG, INFO, WARNING, ERROR
protected Writer createWriter()
throws IOException
IOException - if the output writer could not be created.protected String getThreadAndTimeStamp()
public static void setLevel(int level)
level - one of DEBUG, INFO, WARNING, ERRORgetLevel()public static int getLevel()
setLevel(int)public static void showLog()
|
Java DTV API 1.0 12-Dec-2008 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||