Java DTV API 1.3
18-Nov-2009

com.sun.dtv.lwuit.util
Class Log

java.lang.Object
  extended by com.sun.dtv.lwuit.util.Log

public class Log
extends Object

Pluggable logging framework that allows a developer to initiate logging output.


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
static int getLevel()
          Returns the logging level for printing log details, the lower the value the more verbose would the printouts be.
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

DEBUG

public static final int DEBUG
Constant indicating the logging level Debug is the default and the lowest level followed by info, warning and error.

See Also:
Constant Field Values

INFO

public static final int INFO
Constant indicating the logging level Debug is the default and the lowest level followed by info, warning and error.

See Also:
Constant Field Values

WARNING

public static final int WARNING
Constant indicating the logging level Debug is the default and the lowest level followed by info, warning and error.

See Also:
Constant Field Values

ERROR

public static final int ERROR
Constant indicating the logging level Debug is the default and the lowest level followed by info, warning and error.

See Also:
Constant Field Values
Constructor Detail

Log

public Log()
Method Detail

install

public static void install(Log newInstance)
Installs a log subclass that can replace the logging destination/behavior.

Parameters:
newInstance - the new instance for the Log object

p

public static void p(String text)
Default println method invokes the print instance method, uses DEBUG level.

Parameters:
text - the text to print

p

public static void p(String text,
                     int level)
Default println method invokes the print instance method, uses given level.

Parameters:
text - the text to print
level - one of DEBUG, INFO, WARNING, ERROR

setLevel

public static void setLevel(int level)
Sets the logging level for printing log details, the lower the value the more verbose would the printouts be.

Parameters:
level - one of DEBUG, INFO, WARNING, ERROR
See Also:
getLevel()

getLevel

public static int getLevel()
Returns the logging level for printing log details, the lower the value the more verbose would the printouts be.

Returns:
one of DEBUG, INFO, WARNING, ERROR
See Also:
setLevel(int)

showLog

public 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. Using this method might cause a problem with further log output.


print

protected void print(String text,
                     int level)
Default log implementation prints to the console and the file connector if applicable. Also prepends the thread information and time before

Parameters:
text - the text to print
level - one of DEBUG, INFO, WARNING, ERROR

Java DTV API 1.3
18-Nov-2009

Copyright © 2008-2009 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, California 95054, U.S.A. All rights reserved.

U.S. Government Rights - Commercial software. Government users are subject to the Sun Microsystems, Inc. standard license agreement and applicable provisions of the FAR and its supplements. Sun, Sun Microsystems, the Sun logo and Java are trademarks or registered trademarks of Sun Microsystems, Inc. in the U.S. and other countries.Products covered by and information contained in this service manual are controlled by U.S. Export Control laws and may be subject to the export or import laws in other countries. Nuclear, missile, chemical biological weapons or nuclear maritime end uses or end users, whether direct or indirect, are strictly prohibited. Export or reexport to countries subject to U.S. embargo or to entities identified on U.S. export exclusion lists, including, but not limited to, the denied persons and specially designated nationals lists is strictly prohibited.

DOCUMENTATION IS PROVIDED AS IS AND ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE DISCLAIMED, EXCEPT TO THE EXTENT THAT SUCH DISCLAIMERS ARE HELD TO BE LEGALLY INVALID.

Use of this document is subject to license terms.