com.waveset.util
Class Debug

java.lang.Object
  extended bycom.waveset.util.Debug

Deprecated. - Use com.sun.idm.logging.Trace instead

public class Debug
extends java.lang.Object

Poor man's trace.

Some parts of Lighthouse must execute before WSTrace is available. WSTrace also introduces (by reference) dependencies on very nearly the entire system, which can create a circular reference problem at build time.

Enabling Debug prints messages to System.out. Use this to debug such portions of Lighthouse. For example,
 . lh -DDebug.enable=true -DDebug.DirectoryDataStore=3 -DDebug.DirectoryDataStore\$Item=4 com.waveset.repository.test.DirectoryDataStoreTests 2>&1 | tee temp; vi temp


Field Summary
static int ALWAYS
          Deprecated.  
static java.lang.String code_id
          Deprecated.  
static java.lang.String ENABLE_PROPERTY
          Deprecated. The name of the System property that controls whether Debug is enabled.
static int LEVEL1
          Deprecated.  
static int LEVEL2
          Deprecated.  
static int LEVEL3
          Deprecated.  
static int LEVEL4
          Deprecated.  
static java.lang.String SYMBOL
          Deprecated. The name of a System property that sets the debug level for the global scope.
 
Constructor Summary
Debug()
          Deprecated.  
 
Method Summary
static void entry(int level, java.lang.Class c, java.lang.String method)
          Deprecated. Traces method entry if the debug level in effect for the specified class meets or exceeds the specified level.
static void entry(int level, java.lang.Class c, java.lang.String method, java.lang.Object o)
          Deprecated. Traces method entry if the debug level in effect for the specified class meets or exceeds the specified level.
static void entry(int level, java.lang.String c, java.lang.String method)
          Deprecated.  
static void entry(int level, java.lang.String c, java.lang.String method, java.lang.Object o)
          Deprecated.  
static void exception(int level, java.lang.Class c, java.lang.String method, java.lang.Throwable t)
          Deprecated. Traces exceptional exit if the debug level in effect for the specified class meets or exceeds the specified level.
static void exception(int level, java.lang.String c, java.lang.String method, java.lang.Throwable t)
          Deprecated.  
static void exit(int level, java.lang.Class c, java.lang.String method)
          Deprecated. Traces method exit if the debug level in effect for the specified class meets or exceeds the specified level.
static void exit(int level, java.lang.Class c, java.lang.String method, boolean b)
          Deprecated. Traces method exit if the debug level in effect for the specified class meets or exceeds the specified level.
static void exit(int level, java.lang.Class c, java.lang.String method, int i)
          Deprecated. Traces method exit if the debug level in effect for the specified class meets or exceeds the specified level.
static void exit(int level, java.lang.Class c, java.lang.String method, long l)
          Deprecated. Traces method exit if the debug level in effect for the specified class meets or exceeds the specified level.
static void exit(int level, java.lang.Class c, java.lang.String method, java.lang.Object o)
          Deprecated. Traces method exit if the debug level in effect for the specified class meets or exceeds the specified level.
static void exit(int level, java.lang.String c, java.lang.String method)
          Deprecated.  
static void exit(int level, java.lang.String c, java.lang.String method, boolean b)
          Deprecated.  
static void exit(int level, java.lang.String c, java.lang.String method, int i)
          Deprecated.  
static void exit(int level, java.lang.String c, java.lang.String method, long l)
          Deprecated.  
static void exit(int level, java.lang.String c, java.lang.String method, java.lang.Object o)
          Deprecated.  
static int getLevel()
          Deprecated.  
static int getLevel(java.lang.Class c)
          Deprecated.  
static int getLevel(java.lang.String className)
          Deprecated.  
static void info(int level, java.lang.Class c, java.lang.String method, java.lang.Object o)
          Deprecated. Traces method information if the debug level in effect for the specified class meets or exceeds the specified level.
static void info(int level, java.lang.String c, java.lang.String method, java.lang.Object o)
          Deprecated.  
static boolean isEnabled()
          Deprecated.  
static boolean level1()
          Deprecated.  
static boolean level1(java.lang.Class c)
          Deprecated.  
static boolean level1(java.lang.Class c, java.lang.String method)
          Deprecated.  
static boolean level1(java.lang.String c, java.lang.String method)
          Deprecated.  
static boolean level2()
          Deprecated.  
static boolean level2(java.lang.Class c)
          Deprecated.  
static boolean level2(java.lang.Class c, java.lang.String method)
          Deprecated.  
static boolean level2(java.lang.String c, java.lang.String method)
          Deprecated.  
static boolean level3()
          Deprecated.  
static boolean level3(java.lang.Class c)
          Deprecated.  
static boolean level3(java.lang.Class c, java.lang.String method)
          Deprecated.  
static boolean level3(java.lang.String c, java.lang.String method)
          Deprecated.  
static boolean level4()
          Deprecated.  
static boolean level4(java.lang.Class c)
          Deprecated.  
static boolean level4(java.lang.Class c, java.lang.String method)
          Deprecated.  
static boolean level4(java.lang.String c, java.lang.String method)
          Deprecated.  
static void main(java.lang.String[] args)
          Deprecated.  
static void trace(java.lang.Class c, java.lang.Object o)
          Deprecated. Prints the specified object to STDOUT if debug is in effect for the specified class.
static void trace(int level, java.lang.Class c, java.lang.Object o)
          Deprecated. Prints the specified object to STDOUT if the debug level in effect for the specified class meets or exceeds the specified level.
static void trace(java.lang.Object o)
          Deprecated. Prints the specified object to STDOUT if debug is "on" globally.
static void variable(int level, java.lang.String c, java.lang.String method, java.lang.String label, boolean b)
          Deprecated. Traces method information prepending the specified @param label if the debug level in effect for the specified class meets or exceeds the specified level.
static void variable(int level, java.lang.String c, java.lang.String method, java.lang.String label, int i)
          Deprecated. Traces method information prepending the specified @param label if the debug level in effect for the specified class meets or exceeds the specified level.
static void variable(int level, java.lang.String c, java.lang.String method, java.lang.String label, long l)
          Deprecated. Traces method information prepending the specified @param label if the debug level in effect for the specified class meets or exceeds the specified level.
static void variable(int level, java.lang.String c, java.lang.String method, java.lang.String label, java.lang.Object o)
          Deprecated. Traces method information prepending the specified @param label if the debug level in effect for the specified class meets or exceeds the specified level.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

code_id

public static final java.lang.String code_id
Deprecated. 
See Also:
Constant Field Values

ALWAYS

public static int ALWAYS
Deprecated. 

LEVEL1

public static int LEVEL1
Deprecated. 

LEVEL2

public static int LEVEL2
Deprecated. 

LEVEL3

public static int LEVEL3
Deprecated. 

LEVEL4

public static int LEVEL4
Deprecated. 

SYMBOL

public static final java.lang.String SYMBOL
Deprecated. 
The name of a System property that sets the debug level for the global scope. Its value is expected to be a string-formatted integer in the range from "0" to "4".

For example:

&nsbp  Debug=2

This name also serves as the base (or "stem") for any System property that sets a debug level for a specific class. Construct such a property by appending "." and the basename (i.e., unqualified name) of a Java class to the debug symbol.

Programmatically, this would be:

   Class c = com.waveset.util.Util.class;
   String classSymbolName =
     Debug.SYMBOL + "." + Util.getBaseName(c);
   System.setProperty(classSymbolName, "4");

For example:

&nsbp  Debug=2
&nsbp  Debug.CryptoUtil=0
&nsbp  Debug.JCECipher=0
&nsbp  Debug.WavesetProperties=3

See Also:
Constant Field Values

ENABLE_PROPERTY

public static final java.lang.String ENABLE_PROPERTY
Deprecated. 
The name of the System property that controls whether Debug is enabled.

Its value is expected to be a string-formatted boolean. For example:

&nsbp  Debug.enable=true

See Also:
Constant Field Values
Constructor Detail

Debug

public Debug()
Deprecated. 
Method Detail

trace

public static void trace(java.lang.Object o)
Deprecated. 
Prints the specified object to STDOUT if debug is "on" globally.


trace

public static void trace(java.lang.Class c,
                         java.lang.Object o)
Deprecated. 
Prints the specified object to STDOUT if debug is in effect for the specified class.

Debug is in effect if one of the following is true:


trace

public static void trace(int level,
                         java.lang.Class c,
                         java.lang.Object o)
Deprecated. 
Prints the specified object to STDOUT if the debug level in effect for the specified class meets or exceeds the specified level.

The debug level in effect for the specified class is either:


entry

public static void entry(int level,
                         java.lang.Class c,
                         java.lang.String method)
Deprecated. 
Traces method entry if the debug level in effect for the specified class meets or exceeds the specified level.

See Also:
trace(int, Class, Object)

entry

public static void entry(int level,
                         java.lang.String c,
                         java.lang.String method)
Deprecated. 

entry

public static void entry(int level,
                         java.lang.Class c,
                         java.lang.String method,
                         java.lang.Object o)
Deprecated. 
Traces method entry if the debug level in effect for the specified class meets or exceeds the specified level.

See Also:
trace(int, Class, Object)

entry

public static void entry(int level,
                         java.lang.String c,
                         java.lang.String method,
                         java.lang.Object o)
Deprecated. 

exit

public static void exit(int level,
                        java.lang.Class c,
                        java.lang.String method)
Deprecated. 
Traces method exit if the debug level in effect for the specified class meets or exceeds the specified level.

See Also:
trace(int, Class, Object)

exit

public static void exit(int level,
                        java.lang.String c,
                        java.lang.String method)
Deprecated. 

exit

public static void exit(int level,
                        java.lang.Class c,
                        java.lang.String method,
                        java.lang.Object o)
Deprecated. 
Traces method exit if the debug level in effect for the specified class meets or exceeds the specified level.

See Also:
trace(int, Class, Object)

exit

public static void exit(int level,
                        java.lang.String c,
                        java.lang.String method,
                        java.lang.Object o)
Deprecated. 

exit

public static void exit(int level,
                        java.lang.Class c,
                        java.lang.String method,
                        int i)
Deprecated. 
Traces method exit if the debug level in effect for the specified class meets or exceeds the specified level.

See Also:
trace(int, Class, Object)

exit

public static void exit(int level,
                        java.lang.String c,
                        java.lang.String method,
                        int i)
Deprecated. 

exit

public static void exit(int level,
                        java.lang.Class c,
                        java.lang.String method,
                        long l)
Deprecated. 
Traces method exit if the debug level in effect for the specified class meets or exceeds the specified level.

See Also:
trace(int, Class, Object)

exit

public static void exit(int level,
                        java.lang.String c,
                        java.lang.String method,
                        long l)
Deprecated. 

exit

public static void exit(int level,
                        java.lang.Class c,
                        java.lang.String method,
                        boolean b)
Deprecated. 
Traces method exit if the debug level in effect for the specified class meets or exceeds the specified level.

See Also:
trace(int, Class, Object)

exit

public static void exit(int level,
                        java.lang.String c,
                        java.lang.String method,
                        boolean b)
Deprecated. 

info

public static void info(int level,
                        java.lang.Class c,
                        java.lang.String method,
                        java.lang.Object o)
Deprecated. 
Traces method information if the debug level in effect for the specified class meets or exceeds the specified level.

See Also:
trace(int, Class, Object)

info

public static void info(int level,
                        java.lang.String c,
                        java.lang.String method,
                        java.lang.Object o)
Deprecated. 

variable

public static void variable(int level,
                            java.lang.String c,
                            java.lang.String method,
                            java.lang.String label,
                            java.lang.Object o)
Deprecated. 
Traces method information prepending the specified @param label if the debug level in effect for the specified class meets or exceeds the specified level.


variable

public static void variable(int level,
                            java.lang.String c,
                            java.lang.String method,
                            java.lang.String label,
                            int i)
Deprecated. 
Traces method information prepending the specified @param label if the debug level in effect for the specified class meets or exceeds the specified level.


variable

public static void variable(int level,
                            java.lang.String c,
                            java.lang.String method,
                            java.lang.String label,
                            long l)
Deprecated. 
Traces method information prepending the specified @param label if the debug level in effect for the specified class meets or exceeds the specified level.


variable

public static void variable(int level,
                            java.lang.String c,
                            java.lang.String method,
                            java.lang.String label,
                            boolean b)
Deprecated. 
Traces method information prepending the specified @param label if the debug level in effect for the specified class meets or exceeds the specified level.


exception

public static void exception(int level,
                             java.lang.Class c,
                             java.lang.String method,
                             java.lang.Throwable t)
Deprecated. 
Traces exceptional exit if the debug level in effect for the specified class meets or exceeds the specified level.

See Also:
trace(int, Class, Object)

exception

public static void exception(int level,
                             java.lang.String c,
                             java.lang.String method,
                             java.lang.Throwable t)
Deprecated. 

level1

public static boolean level1()
Deprecated. 
Returns:
true if the global debug level is at least 1; otherwise false.

level2

public static boolean level2()
Deprecated. 
Returns:
true if the global debug level is at least 2; otherwise false.

level3

public static boolean level3()
Deprecated. 
Returns:
true if the global debug level is at least 3; otherwise false.

level4

public static boolean level4()
Deprecated. 
Returns:
true if the global debug level is at least 4; otherwise false.

level1

public static boolean level1(java.lang.Class c)
Deprecated. 
Returns:
true if a debug level of at least 1 is in effect for the specified class.

level2

public static boolean level2(java.lang.Class c)
Deprecated. 
Returns:
true if a debug level of at least 2 is in effect for the specified class.

level3

public static boolean level3(java.lang.Class c)
Deprecated. 
Returns:
true if a debug level of at least 3 is in effect for the specified class.

level4

public static boolean level4(java.lang.Class c)
Deprecated. 
Returns:
true if a debug level of at least 4 is in effect for the specified class.

level1

public static boolean level1(java.lang.Class c,
                             java.lang.String method)
Deprecated. 
Returns:
true if a debug level of at least 1 is in effect for the specified class and method.

level1

public static boolean level1(java.lang.String c,
                             java.lang.String method)
Deprecated. 

level2

public static boolean level2(java.lang.Class c,
                             java.lang.String method)
Deprecated. 
Returns:
true if a debug level of at least 2 is in effect for the specified class and method.

level2

public static boolean level2(java.lang.String c,
                             java.lang.String method)
Deprecated. 

level3

public static boolean level3(java.lang.Class c,
                             java.lang.String method)
Deprecated. 
Returns:
true if a debug level of at least 3 is in effect for the specified class and method.

level3

public static boolean level3(java.lang.String c,
                             java.lang.String method)
Deprecated. 

level4

public static boolean level4(java.lang.Class c,
                             java.lang.String method)
Deprecated. 
Returns:
true if a debug level of at least 4 is in effect for the specified class and method.

level4

public static boolean level4(java.lang.String c,
                             java.lang.String method)
Deprecated. 

getLevel

public static int getLevel()
Deprecated. 
Returns:
the debug level current in effect globally.

getLevel

public static int getLevel(java.lang.Class c)
Deprecated. 
Returns:
the debug level currently in effect for the specified class. If class is null, returns the debug level currently in effect globally.

getLevel

public static int getLevel(java.lang.String className)
Deprecated. 

isEnabled

public static boolean isEnabled()
Deprecated. 

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Deprecated. 
Throws:
java.lang.Exception