Overview | Package | Class | Tree | Deprecated | Index | Help
| JSS 3.1.2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.mozilla.jss.util
Class Debug

    java.lang.Object
      |
      +--org.mozilla.jss.util.Debug

public class Debug
extends java.lang.Object

Controls debug-mode operation of JSS classes, and allows for printing trace statements to standard output.

See Also:
  `Assert`

Field Summary
`static boolean` | `DEBUG` Controls debug mode for JSS.
`static int` | `ERROR`
`private static int` | `mDebugLevel` The debug level of the application.
`static int` | `OBNOXIOUS`
`static int` | `QUIET`
`static int` | `VERBOSE`

Constructor Summary
`Debug()`

Method Summary
`static int` | `getLevel()` Get debugging level of the application.
`static java.lang.String` | `getLevelStr()`
`static void` | `setLevel(int level)` Set the debugging level of the application.
`private static void` | `setNativeLevel(int level)`
`static void` | `trace(int level, java.lang.String str)` Print a trace statement to standard output.
`static void` | `trace(java.lang.String str)` Print a trace statement to standard output.

Methods inherited from class java.lang.Object
`, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait`

Field Detail

### DEBUG

    public static final boolean DEBUG

  Controls debug mode for JSS. If DEBUG==true, debugging code will be enabled. If DEBUG==false, debugging code will not be executed. This variable does not influence the printing of trace statements; their execution depends on the debug level, which can be accessed through setLevel and getLevel.
  See Also:
    `Assert`

### OBNOXIOUS

    public static final int OBNOXIOUS

### VERBOSE

    public static final int VERBOSE

### ERROR

    public static final int ERROR

### QUIET

    public static final int QUIET

### mDebugLevel

    private static int mDebugLevel

  The debug level of the application. This gives the level of detail trace messages will contain. A level of 0 means no debugging statements will be printed. !!If you change this, change it in the native code too!!

Constructor Detail

### Debug

    public Debug()

Method Detail

### trace

    public static void trace(int level,
                             java.lang.String str)

  Print a trace statement to standard output.
  Parameters:
    `level` - The detail level of the statement. The level must be greater than 0.
    `str` - The trace statement.

### trace

    public static void trace(java.lang.String str)

  Print a trace statement to standard output. Uses the VERBOSE detail level.
  Parameters:
    `str` - The trace statement.

### setLevel

    public static void setLevel(int level)

  Set the debugging level of the application. The level must not be negative.

### setNativeLevel

    private static void setNativeLevel(int level)

### getLevel

    public static int getLevel()

  Get debugging level of the application.
  Returns:
    The current debugging level of the application.

### getLevelStr

    public static java.lang.String getLevelStr()

Overview | Package | Class | Tree | Deprecated | Index | Help
| JSS 3.1.2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD